public
properties of your class to build up the collection, the only thing you need is the Mapper.
InsertBulk()
functionality provided.
SELECT COUNT($.Items) FROM Collection WHERE COUNT($.Items) > @Limit.
In C#, I believe this would be col.Find(X => X.Items.Count > limit);
Hello! I would like to select two field from my root document: RootProp and ChildProp (which is an array of objects), based on a condition:
SELECT $.RootProp, $.ChildProp[@.Name = 'ChildPropName'] FROM MyCollection WHERE COUNT($.ChildProp) > 0
My goal is to get only those results that have a populated ChildProp array (Where statement). However in the results I get also those records which do not contains any element on the ChildProp array. What am I missing? thanks
:point_up: Edit: Hello! I would like to select two field from my root document: RootProp and ChildProp (which is an array of objects), based on a condition:
SELECT $.RootProp, $.ChildProp[@.Name = 'ChildPropName'] FROM MyCollection WHERE COUNT($.ChildProp) > 0
My goal is to get only those results that have a populated ChildProp array (Where statement). However in the results I get also those records which do not contains any element on the ChildProp array. What am I missing? thanks
Hello! I need help in updating a list in my User table:
i have a Table called User. The User has a List with Devices.
Now i changed my Device assembly and namespace and now i need to change the Type (_type) of my Devices.
I tried so many approaches but nothing did work and im out of ideas. The last command i tried was:
'''UPDATE User SET Devices = Devices[]._type = 'DeviceSet.Mobile.Models.BleDevice, DeviceSet' ''' which gave me following Error:
Left expression `MAP($.Devices[]=>@._type)` returns more than one result. Try use ANY or ALL before operant.
I'm looking forward to any help!
Hello, I recently changed a field's data type from int to string.
After the changes, I'm getting "Casting Exception" when I try to read the records.
I did some reading and notice that I need to manage the new schema using DatabaseVersion. In order to change the schema, I need to perform the migration to the existing database. Is this the right way to do? Any other idea?
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).
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)
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.
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...
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)