Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:18
    DanTwomey labeled #2253
  • 09:18
    DanTwomey opened #2253
  • Nov 25 11:53
    UlyssesWu opened #2252
  • Nov 25 11:53
    UlyssesWu labeled #2252
  • Nov 24 14:17
    hmi95 commented #1504
  • Nov 22 23:42
    MollieofMSVR edited #2249
  • Nov 20 16:26
    sangeethnandakumar commented #1546
  • Nov 20 16:07
    sangeethnandakumar commented #1546
  • Nov 18 23:45
    BenWoodford commented #1984
  • Nov 18 14:05
    MollieofMSVR edited #2249
  • Nov 18 14:04
    MollieofMSVR edited #2249
  • Nov 18 14:03
    MollieofMSVR edited #2249
  • Nov 18 14:03
    MollieofMSVR edited #2249
  • Nov 17 15:27
    BenWoodford commented #1984
  • Nov 16 13:25
    sgf commented #2075
  • Nov 16 13:25
    sgf commented #2075
  • Nov 16 13:13
    sgf opened #2251
  • Nov 16 13:13
    sgf labeled #2251
  • Nov 16 13:08
    sgf commented #2227
  • Nov 16 00:24
    ultravelocity commented #2017
JeeShen Lee
@jeeshenlee

I went ahead to implement the migration to change the data type by resaving the BSONValue.

After that, I increment the database version to 1.

Now, how do I mark a newly created database to version 1 so it won't have to go through the migration (migration is meant for existing database).

Rafał Piotrowski
@rafalpiotrowski:matrix.org
[m]
Hi, can I force litedb to flush data to disk? My problem is that after update and shortly after when I read the data is not reflecting the changes made by update!
Rafał Piotrowski
@rafalpiotrowski:matrix.org
[m]
BTW. I am calling Checkpoint and I have also set CheckpointSize to 0 to manually call Checkpoint.
ajay kishore
@ajaykishore666_twitter
I have dotnetnuke db file, can i open that in litedb. how to view other db files in litedb with different extensions(not the .db)
Tim Moore
@tjmoore
Hi, what does this error mean? Google turned up only one result and it's in Chinese!
      System.Exception: LiteDB ENSURE: get only index below highest index
         at LiteDB.Constants.ENSURE(Boolean conditional, String message)
         at LiteDB.Engine.BasePage.Get(Byte index)
         at LiteDB.Engine.IndexService.DeleteAll(PageAddress pkAddress)
         at LiteDB.Engine.LiteEngine.<>c__DisplayClass3_0.<Delete>b__0(TransactionService transaction)
         at LiteDB.Engine.LiteEngine.AutoTransaction[T](Func`2 fn)
         at LiteDB.Engine.LiteEngine.Delete(String collection, IEnumerable`1 ids)
         at LiteDB.SharedEngine.Delete(String collection, IEnumerable`1 ids)
         at LiteDB.LiteCollection`1.Delete(BsonValue id)
Tim Moore
@tjmoore

I know LiteDB is probably not ideal for this, but is there any advice on deployment on a active/standby cluster?

Due to customer requirements project I'm working on has been deployed this way and the .db files are replicated to the standby. Failover occurs and in theory it picks up on the standby.

It appears to work in testing but there's concern that it may not be robust and have reports of some issues that haven't been reproduced (and no errors logged). May be totally unrelated, but want to check if anyone has deployed on such a cluster set up.

Long term the aim is to implement Mongo DB or similar for this.

Alex Sinitsky
@thryl
Hey guys, getting an exception while trying to do thebase.Insert(rec) - "this page should be in slot #0". Interestingly, the exception isn't thrown in debug, and Insert actually works correctly. I've checked why does it throw and found out the slot is 1 instead of 0, thus ENSURE throws an exception. Does anybody know what might be the issue here?
Paramjit Singh
@HobDev
Hello all
I want to save ordered items by date in LiteDb like this
IEnumerable<Destination> orderedList = destinations.OrderBy(d => d.TripStartDate);
tripContext.Destinations.Insert(orderedList);
But when I access the Destinations in the app it is not in correct order by StartDate
Am I doing something wrong. Please help
Matthew Oh
@newbiz90:matrix.org
[m]
1 reply
Shahab Ouraie
@th3r0b0t

Hello everyone @/all
I'm new to whole this, so plz correct me if I'm wrong:
1- A poco class when inserts into DB known as a Document;
2- If a poco class contains an object property of another poco class, this is a SubDocument;

Questions:
1- Does $ symbol refers to the main poco class/Document when used in LINQ-expressions?
2- Whats different between SELECT $ from students and SELECT * from students (Basically * and $)?
3- Whats is and the difference between Collection and Document ?

tnx in advance; Couldnt find out through docs...

ariana strangelove
@dangergrrl:matrix.org
[m]
Hi :)
oh nvm, i can read the source
Scott Wolf
@wolfson292
Is there any method to run a repair on a database. I am getting the following exception when trying to open a file.
System.Exception: LiteDB ENSURE: ReadFull must read PAGE_SIZE bytes [4096]
   at LiteDB.Constants.ENSURE(Boolean conditional, String message)
   at LiteDB.Engine.DiskService.ReadFull(FileOrigin origin)+MoveNext()
   at LiteDB.Engine.WalIndexService.<>c__DisplayClass19_0.<<CheckpointInternal>g__source|0>d.MoveNext()
   at LiteDB.Engine.DiskService.Write(IEnumerable`1 pages, FileOrigin origin)
   at LiteDB.Engine.WalIndexService.CheckpointInternal()
   at LiteDB.Engine.WalIndexService.TryCheckpoint()
   at LiteDB.Engine.LiteEngine.Dispose(Boolean disposing)
   at LiteDB.Engine.LiteEngine..ctor(EngineSettings settings)
Ilya Popov
@ijamon
@wolfson292 LiteDB Studio?
Hi guys, could you help. How can i do postgres-like "DO NOTHING" for Upsert on needed property?
Sébastien Duterte
@Feulito_gitlab
Hello guys !
I need some help with an error with a "LiteDB ENSURE exception : page type must be collection page".
Do you know how this error occurs ? Is it possible to get this error when the database is killed brutally (without dispose, for exemple) ?
LP
@grofit

I am looking at integrating this with an existing project, so we already have data models etc but we already have a Guid based Id field, is there a way to hint/tell Lite DB to just use that field to be the id .

Not fussed if it duplicates the custom Id into _id or some other mechanism, I just need to be able to query on the Guid not the BsonValue based Id, although I appreciate I may externally use a Guid in my data access layer but internally it may have to just make a BsonValue on the fly or something...

Anyway any advice on this would be great as I assume its a common use case, just couildnt find much in the docs around it

LP
@grofit

Also I have a query around dynamic style types, i.e I have a class with an interface property so when deserializing its not clear what C# type it is.

When I was using JSON.Net I had a custom JsonConverter which handled that part, but im not entirely sure here how to mimic that with LiteDB, historically all the data used to be pumped out to raw json files using JSON.Net so generally it seems a good fit for just moving each json file to be its own collection, but not quite sure how to work around that bit

LP
@grofit
I have put a question about this on stack overflow so if anyone does read this and knows please put the answer in there https://stackoverflow.com/questions/73611168/any-way-to-mimic-jsonconverter-style-serializing-deserializing-of-complex-object
LP
@grofit
For now im just going to introduce an intermediate JSON layer in our repositories which converts them into BsonDocuments and hope for the best :D
BuechnerA
@BuechnerA

Dim Result = m_Col.Find(Function(x) x.Name.StartsWith("F")).ToList
--> If an entry starting with "F" is found, I get this exception:

System.NullReferenceException: "The object reference was not set to an object instance.

--> If no entry starting with "F" is found, I get an empty list "Result" (LiteDB.LiteCollection(Of T)

Where is my problem? Thanks for quick help!

Sorry: list "Result" (List(Of T))
LP
@grofit
are all the types correct in all the bits you use i.e all Generics match
and also are all the bits you expect to be populated/deserialized on the object populated in the collection store?
BuechnerA
@BuechnerA
I have found the cause: I had "only" a separate constructor with special parameters in the class and removed the standard constructor. Thanks for all the help.
Kevin Vuilleumier
@vekin03
Hello, thank you to all the team for this great project! I have two questions that I can't find the answer in the document, in the source code or in the issues...
  1. How to write a SQL query with parameters in LiteDB?
    I tried query.Where($"Name = @p0", "Arthur");, but it doesn't work. The parameter doesn't seem to be used.
    However, it works well by doing query.Where(x => x.Name == "Arthur");
Kevin Vuilleumier
@vekin03
  1. There is Query.Contains() but not Query.DoesntContains (or equivalent). How can we implement the expression "does not contain" with the Query class?
ChessSuite
@santafiora
Hi Guys i am completly new to litedb so my question is: Is there any compressing algo for Tabledata like huffman or on file basis ?
Sam Worth
@Ebandag203Worth_twitter
@mbdavid - how can I contact you directly?