Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
Description
There's no documented way to specify N1QL query parameters. I can hack something by using the 'options' array, but that's difficult to find. We should be encouraging users to use parameterized queries, not discouraging them.
Currently I'm using
$query = CouchbaseN1qlQuery::fromString('SELECT airportname FROM `travel-sample` WHERE city=$1 AND type="airport"');
|
$query->options['args'] = array($city);
|
But I suppose you could do something, either in the constructor, or as namedParams(), posParams(), etc.