LiteDB - A .NET NoSQL Document Store in a single data file
MIT License
Bot releases are hidden (Show)
Published by mbdavid about 5 years ago
Shrink
MAP
and FILTER
expression methods:
MAP(children => age)
FILTER(items => price > 100)
REMOVE_KEYS
, OID_CREATIONDATE
, TO_LOCAL
, TO_UTC
, DISTINCT
, UNION
, EXCEPT
, TOP
BsonDocument
mapper
public People(string name) { this.Name = name; }
GroupBy<T, K>
(must use BsonExpression
)SharedConnection
to keep database closed after each command (can be used for multiple processes in same machine)Published by mbdavid about 5 years ago
Here is the new alpha version of LiteDB v5. It's an alpha version, so that means it's not ready for production yet! The API may change and data format can also change before final release. But we would be very pleased if you could test the new version and give feedback or report any issues that you stumble upon.
FileStorage
with custom Id
typeBsonExpressions
: transform, filter, map, reduce, ..upgrade=true
in connection string)Query
Shrink
method and UserVersion
propertyPredicateBuilder
ITEMS
method (convert array into IEnumerable)ALL
method (return true
only if all conditions are true
) - ALL($.Items[*].Price > 0) = true
help <command>
Document
syntax: new BsonExpression("{_id: 1, name: 'John'}")
Array
syntax: new BsonExpression("[1, 'two', false]")
EXTEND()
INT()
, DOUBLE()
, STRING()
, DATE()
...DATEADD()
, DATEDIFF()
, YEAR()
, MONTH()
, DAY()
Published by mbdavid about 7 years ago
Shared
mode)Expression
parser/executor - see Expression Wiki
col.EnsureIndex(x => x.Name, "LOWER($.Name)");
col.EnsureIndex("GrandTotal", "SUM($.Items[*].Qtd * $.Items[*].Price)");
Include
it´s supported in Engine level with ANY nested includescol.Include(x => x.Users)
.Include(x => x.Users[0].Address)
.Include(x => x.Users[0].Address.City)
.Find(...)
LinqQuery
compiler (works as linq to object)
col.Find(x => x.Name == "John" && x.Items.Length.ToString().EndsWith == "0")
Query.And
to Query.Between
when possibleQuery.Between
open/close intervalv3
(no upgrade needed)(Seek([Age] > 10) and Filter([Name] startsWith "John"))
EnsureIndex
on initialize database)Published by mbdavid about 7 years ago
EnsureIndex
on initialize database)ulong
) to use in engine level auto-id_id
with BsonType
= ObjectId
, Guid
, DateTime
, Int32
or Int64
Query.And
use only one index side with full scan on other(Seek([Age] > 10) and Filter([Name] startsWith "John"))
Query.And
to Query.Between
when possibleQuery.Between
open/close intervalcol.Find(x => x.Id < 10 && x.Name.Length > 10)
null
values)LiteRepository
to access dataLiteEngine.CreateDatabase
typeof(T).Name
)BsonId
, Id
or <ClassName>Id
)Published by mbdavid over 7 years ago
LiteEngine
class to access dataOpenWrite() Stream
v2
using ;upgrade=true
in connection string