google-cloud-dotnet: [firestore] Shouldn't a start/end query cursor allow empty set?
var anomaly = await firestoreDB.Value.Collection("col").OrderByDescending("field").StartAt(new object[0])
This above line cause an error does not allow empty set at a start/end query cursor
But doesn’t this should be allowed for query the empty array and null? Actually it should let me got the whole documents which has value of that field not an array nor object?
Is it really a limit in firestore or just this library?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21
Commits related to this issue
- Allow empty value sets for Start/End cursors Fixes #2588. Eventually this is likely to be covered in conformance tests, but the additional unit tests cover it for now. (We can remove those when the ... — committed to jskeet/google-cloud-dotnet by jskeet 6 years ago
- Prohibit an empty sequence of values for StartAt/EndAt etc We do permit a single empty value, but that's not the same as an empty sequence of values. Test rewritten to show using a `new List<object>... — committed to jskeet/google-cloud-dotnet by jskeet 6 years ago
Sure, happy to. (It’s effectively covered in the new conformance tests which I haven’t merged yet, but I can do it more explicitly.)
Just checked, and yes, it should be allowed. I’ll see if I can get to that this week.
Right. I’ve asked internally about the intended behavior. It should be easy to fix if it should be allowed - and we’ll add a conformance test either way to make sure all languages are consistent.