OBJECT_VALUES issue in SQL++ for Mobile

Hi,

I have a collection called “books” in “cloud” scope. This is the document structure -

{
    "doc_type": "book_item",
    "plumap": {
        "000": {
            "title": "To Kill a Mockingbird"
        },
        "000": {
            "title": "Pride and Prejudice"
        },
    }
}

I want to search for books by title. This query is working in couchbase server.

SELECT * FROM bucket.cloud.books AS d WHERE d.doc_type = 'book_item' AND ANY v IN OBJECT_VALUES(d.plumap) SATISFIES v.title LIKE '%mock%' END LIMIT 5

I want to do the same on Android with SQL++ for mobile but I’m getting this error “N1QL syntax error near character 96” which is the parenthesis “(” after OBJECT_VALUES. How can I fix the syntax?

Or if it’s possible to get this through QueryBuilder is also fine.

You can see here:

https://docs.couchbase.com/couchbase-lite/current/c/query-n1ql-mobile.html#lbl-functions

that OBJECT_VALUES is not available in the Mobile SQL++ dialect, and this is the reason for the syntax error.

I’m not a Mobile SQL++ expert so I’ll defer to others to indicate if this sort of filtering is possible in Mobile SQL++.

HTH,