LiteDB - A .NET NoSQL Document Store in a single data file
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)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
IncludeAll
missing methodIncludeAll
methodLENGTH
method expressionITEMS
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()
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"))
(preparing to new visual LiteDB database management tool)EnsureIndex
on initialize database)KEYS
, MOD
expression function(
and )
inside expressions_id
when insert