Litedb: Update without instance of the object

Created on 9 May 2017  路  3Comments  路  Source: mbdavid/LiteDB

Hi, first of all, thanks @mbdavid for creating and supporting LiteDB. I'm migrating my project from SQLite to LiteDB.

Is it possible to execute an Update in one field of each document of the Collection without have to get the list of objects to change the value and execute the update to persist it?

Something like that example using SQL:

UPDATE table_name SET status = 1;

Most helpful comment

Hi @sandolkakos, it麓s not possible in nosql. You always need deserialize all object, change it, and serialize -> persist again. In a SQL database, tables are column fixed and it's possible read/write selected columns. But when you data is serialized, it麓s not possible

All 3 comments

Hi @mbdavid, do you know if is there anyway to execute something like this?

Hi @sandolkakos, it麓s not possible in nosql. You always need deserialize all object, change it, and serialize -> persist again. In a SQL database, tables are column fixed and it's possible read/write selected columns. But when you data is serialized, it麓s not possible

I understand. Thank you for the detailed explanations ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josephinenewbie picture josephinenewbie  路  3Comments

axelgenus picture axelgenus  路  3Comments

GW-FUB picture GW-FUB  路  3Comments

onurhkb picture onurhkb  路  4Comments

furesoft picture furesoft  路  4Comments