Description
Need to properly support this feature by caching previously prepared statement calls in-memory to reduce the two-call requirement:
"To use prepared, the input must be a prepared object; to get a prepared object, it's necessary to run prepare on the n1ql statement. So two requests are required:
1) prepare the n1ql statement:
statement=PREPARE SELECT * FROM `beer-sample` WHERE type = $1
2) execute the prepared statement:
prepared=
&args=["beer"]
The output of request 1) will give you one object in the results list, which is the prepared object you need to use for the prepared parameter in request 2. In other words, results[0] from request 1 is what you use as the value for prepared in request 2.
"