Questions tagged [litedb]

Use this tag for questions about LiteDB, which is a a free, open-source, embedded NoSQL database for .NET available via nuget or direct download.

LiteDB is a free, open-source, embedded NoSQL database for .NET inspired by MongoDB. Because it is a serverless document store, LiteDB can be "installed" via NuGet or by copying a dll into your project's bin folder.

Resources

Related Tags

183 questions
0
votes
2 answers

F# member an inner function, evaluated only on first invocation

I'm trying to use a kind of aggregate to a Class in F# like this member this.FullName with get() = fullName(). You can see I have designed it as a member that calls an internal function let fullName() = (string Id) +" "+ Name, and it seems that the…
Santi
  • 491
  • 6
  • 14
0
votes
1 answer

Copying data from a LiteDb Query into a List causes System.InvalidOperationException

I've been playing around with LiteDb to improve the performance of my Data Feed. The feed runs on an Azure database and in order to reduce the amount DTU's and connections we use(I'm doing some logic inside a parallel forach loop), I pull the data…
Madhav Shenoy
  • 798
  • 12
  • 32
0
votes
1 answer

Selecting/Filtering Data from LiteDB in Visual Basic .NET

I'm trying to retrieve data from a LiteDB NOSQL database but i'm struggling to get the syntax correct in Visual Basic. The database is created correct (validated in LiteDBViewer) and I can count the values in the collection, but when I try to…
Optimaximal
  • 545
  • 1
  • 5
  • 28
0
votes
1 answer

Database design with user data and central database updates

I am designing a windows desktop app. It uses LiteDB as the single file local db for users - using it very much as a relational database with foreign keys etc (each Table having an integer ID as primary key and references to other tables via FK…
stigzler
  • 793
  • 2
  • 12
  • 29
0
votes
1 answer

How can I insert/update a List as member of an entity in SQLite?

Let's say I have a really simple class: public class myClass{ public int Id {get;set;} public object SomeProperty {get;set;} public List ListOfStrings {get;set;} } whenever I try to retrieve myClass entity from the database,…
garry man
  • 445
  • 4
  • 14
0
votes
1 answer

Can I dynamically choose the type of a LiteCollection in a method signature?

I have a custom class Customer and inside another class a method that returns a list based on a LiteCollection from LiteDB typized using the Customer class in the signature. What I wanted to know is if it’s possible creating a method that…
nicktheone
  • 77
  • 2
  • 10
0
votes
1 answer

How to know with which LiteDB version DB file has been created?

I am using LiteDB to create db file. but sometime I use LiteDB version 1 and sometime v4. Using any version I am creating same file. So how can I detect that which version of LiteDB was used to create the db file in c# code? Note: I don't want user…
Smiley
  • 55
  • 4
0
votes
1 answer

Retrieving document structure based on previous records

Writing this question I'm working with .Net's LiteDB but I think the question applies to entire NoSQL matters. One of collection in my db contains documents that don't have fixed structure. I want to let user add his own values, of whatever name and…
Piotrek
  • 10,919
  • 18
  • 73
  • 136
0
votes
1 answer

Does LiteDB support long file names (>=260 char) in the connection string

Im using litedb as a file index, whereby I recreate the directory structure of a file share and drop a litedb.db file into each directory in my hierarchy. The problem I'm encountering seems to be where the directory structure is more than 260…
jondow
  • 624
  • 5
  • 15
0
votes
1 answer

Size of a collection in LiteDb

Is it possible to get the size (disk space) of a collection? I want to limit the size of the database and have a few collections, which grow in size over time. I want to delete older entries if the size of this collection is too large. Similar to a…
StephanKE
  • 3
  • 2
0
votes
1 answer

Invalid BSON data type 'Null' on field '_id'

On a similar vein to this question I am trying the example in the LiteDB documentation, and at runtime get the error: Invalid BSON data type 'Null' on field '_id'. My code is below, including my attempts to solve the problem, which was to add the…
Martin KS
  • 481
  • 7
  • 26
0
votes
1 answer

Search with multiple criterias in LiteDB : combine queries

Can someone tell me how to search data in liteDb using the following pseudocode ? Pseudo Code col = db.GetCollection("products"); string keyword = "1AS"; Query query; if (condition1) { query += Query.Contains("ProductName",…
toumir
  • 621
  • 6
  • 17
0
votes
1 answer

LiteDB Collection returned but query returns null

I've done a fair bit of research, but I can't find anyone who has the same problem as me (sadly). I am using LiteDB to create a NoSQL database. When the program first runs and the database is created, the query in the example below works just…
Yecats
  • 1,715
  • 5
  • 26
  • 40
0
votes
1 answer

Is it possible to index the properties of a collection in LiteDb

I have a result object in litedb with a collection property, as below: public class Result { public int Id { get; set; } public ICollection ExtractedEntities { get; set; } } public class Entity { public string Value { get; set;…
jondow
  • 624
  • 5
  • 15
0
votes
2 answers

Showing LiteDB database items in data grid view

I'm using LiteDB. Customer definition is like below: public class Customer { public int Id { get; set; } public string Name { get; set; } public string[] Phones { get; set; } public string[] Cars { get; set; } } When I want to show…
Hadi Barak
  • 480
  • 1
  • 4
  • 17