I am using Couchbase Server Version: 4.5.0-2601 Enterprise Edition (build-2601) .
My N1QL works fine, and When I query data by:
curl -v http://127.0.0.1:8093/query/service -H "Content-Type: application/json" -d '{ "prepared":"fetchDataTest", "encoded_plan":"encoded_paln_codes", "$key":"key1" }'
PS: encoded_paln_codes is query from system:prepareds
by name == "fetchDataTest"
it return the following error:
{
"requestID": "e1c86760-6b7a-4fc6-a652-576d5c74fb37",
"errors": [
{
"code": 4070,
"msg": "Unable to decode prepared statement - cause: Unrecognizable prepared statement - cause: JSON unmarshalling error: No operator for name DistinctScan"
}
],
"status": "fatal",
"metrics": {
"elapsedTime": "64.179µs",
"executionTime": "63.847µs",
"resultCount": 0,
"resultSize": 0,
"errorCount": 1
}
}
but the same query by name works fine:
curl -v http://127.0.0.1:8093/query/service -H "Content-Type: application/json" -d '{ "prepared":"fetchDataTest", "$key":"key1" }'
and
curl -v http://127.0.0.1:8093/query/service -d 'prepared="fetchDataTest"&$key="key1"'