Closed fhuonder closed 3 years ago
Hi @fhuonder,
currently every entry gets a unique ID that's why arrays at 0 level are not allowed. You could do something like this:
{"_" : ["some", "data"] }
Unfortunately querying arrays is very limited at the moment.
I guess it wouldn't be very difficult to implement but if it exists users of the lib would expect better querying options. That's why I think it should be implemented afterwards.
Greetings, Mario
Hi @fhuonder, I've just added basic array querying, and it would be great if you could test the changes. There is a prerelease at pub.dev and you can check out the syntax in this test file. Feedback is greatly appreciated!
Greetings, Mario
Hi Mario,
I can have a look. I hope that it fits into my schedule next week. I'll come back to you.
Regards, Florian
Hi Mario,
I had a quick look and for me it looks good. For my case this would work like this.
Regards, Florian
Hi,
According to rfc7159 (https://tools.ietf.org/html/rfc7159) a JSON can also have an array as top level element
Because the methods of the objectdb are of type
Map<String, dynamic>
(for insert and update) it is not possible to pass a List to be stored. Would be great if this will be possible in a future version.Regards, Florian