I’m trying to run EXECUTE for a prepared statement in N1QL. Looking at the docs:
There is no example for using EXECUTE in N1QL, only using CURL.
I have successfully prepared and executed a statement using the following:
PREPARE prepared1 FROM SELECT * FROM `beer-sample` LIMIT 100;
I can prepare a second statement using:
PREPARE prepared2 FROM SELECT * FROM `beer-sample` WHERE geo.accuracy != $acc AND country = $co;
However I have not been able to find a way to execute the statement using:
EXECUTE prepared2 ... ;
where the … includes the arguments $acc and $co (I’ve tried using WHERE|USING|WITH $acc=…, and I’ve tried using brackets and creating an object).
Is it possible to use the EXECUTE with arguments in N1QL - and if so, how? There is no documentation for this that I could find.
Note: I know that it can be done with Curl, I would just like to do it from the workbench using N1QL.