incrediblesound / OpalDB

A straightforward zero-dependency in-memory database
16 stars 1 forks source link

Phony update with tests #3

Closed dmi3y closed 8 years ago

dmi3y commented 8 years ago

Update is irrelevant, resistance is futile.

incrediblesound commented 8 years ago

Haha we were working on this at the same time! Crazy :-)

dmi3y commented 8 years ago

Update? It seems because everything is by reference it is hard to wrap head around. Anyways this is an attempt.

And it is not work, it is fun :D

incrediblesound commented 8 years ago

Yes! It is crazy! All records inside the database are by reference. If you mutate the record in one place it will be reflected in all the indexes. All records return by queries, however, are copied and therefore will not affect the database.

dmi3y commented 8 years ago

Cool, I see the new update. PR is offline!