I would like to get a default value (something like “0” when there is no document found for the search criteria.
SELECT meta().xattrs._sync.rev as rev from
poc where meta().id in [‘C::100008_157’,‘C::100007_157’]
In this we don’t have a document for C::100008_157 so i want to set a default value “0” in the response result set. How do we do it?
If source doesn’t produce any document it will not project.
If you really needs that
SELECT IFMISSINGORNULL(META(p).xattrs._sync.rev,0) AS rev
FROM ["C::100008_157","C::100007_157"] AS key
LEFT JOIN poc AS p ON KEYS key;