$.Properties.customer.Properties[*].FirstName any = 'Jonathan'
. Similarly, if you want to check whether all of these are equal to a value, you can use $.Properties.customer.Properties[*].FirstName all = 'Jonathan'
DateTime
field or even make it your Id field. Due to the BSON spec, LiteDB only stores dates up to the miliseconds (losing a bit of precision). There is a simple workaround for that though, so let me know if you need help with that.
:memory:
as its datafile or by using the LiteDatabase
ctor that takes a Stream (you can pass a MemoryStream
to it)
@raizam You can create an index over a
DateTime
field or even make it your Id field. Due to the BSON spec, LiteDB only stores dates up to the miliseconds (losing a bit of precision). There is a simple workaround for that though, so let me know if you need help with that.
will the DateTime order be preserved when I'll iterate the records? in both indexed/key scenarios?
var ids = db.Execute("select $._id from collection").ToEnumerable().Select(doc => doc["_id"].AsInt32).ToList();
(assuming the id is Int32
)
DbRef
.ToList()
or .ToArray()
, then all the documents in the collection will be loaded into memory.