Hello I have one question about indexing array in subquery, in where condition. Basicly I want just first element of array Array[0] in where condition.
"SELECT META().id FROM database
WHERE ANY object in Objects[0]
SATISFIES (object.isObject = false OR object.finalObject.isObject = false) END AND (Type = \'type\')"
There can be lot of Objects in array but i need just that first one.
Is that possible in couchbaselite 3.0 ?
Thanks for answers.
EDIT: I want replace WHERE ANY with WHERE FIRST. But I don’t know if its possible
Hello, no I need all MainObjects which has array with another objects [Objects][0] and i need to compare just first element of this property. But MainObjects can be more than 1
Do you have a real example? I don’t see where “Objects” comes from. META().id is a string. Could you please clarify? If you have a similar query that works in current version and suggest improvement in specific places, that would be greatly helpful.
@RomYk97, are you saying that query is not working when Objects[0] itself is an array? If so, I will file a bug, because the current grammar allows it.
With regard to your suggestion of WHERE FIRST, does @vsr1’s suggestion fit your need?
Sorry for not following up sooner. To clarify, regarding, “I want replace WHERE ANY with WHERE FIRST,” we currently do not have “WHERE FIRST,” as you wanted it. My question is, is it same as saying, Objects[0][0] ?