|
@@ 308-319 (lines=12) @@
|
| 305 |
|
} |
| 306 |
|
$query = \CouchbaseN1qlQuery::fromString($query); |
| 307 |
|
|
| 308 |
|
if ($this->breakingVersion()) { |
| 309 |
|
$query->consistency($this->consistency); |
| 310 |
|
$bucket = $this->openBucket($this->bucket); |
| 311 |
|
$this->registerOption($bucket); |
| 312 |
|
$query->namedParams(['parameters' => $bindings]); |
| 313 |
|
$this->firePreparedQuery($query); |
| 314 |
|
$result = $bucket->query($query); |
| 315 |
|
$this->fireReturning($result); |
| 316 |
|
$this->metrics = (isset($result->metrics)) ? $result->metrics : []; |
| 317 |
|
|
| 318 |
|
return (isset($result->rows[0])) ? $result->rows[0] : false; |
| 319 |
|
} |
| 320 |
|
// @codeCoverageIgnoreStart |
| 321 |
|
$query->consistency($this->consistency); |
| 322 |
|
$bucket = $this->openBucket($this->bucket); |
|
@@ 347-358 (lines=12) @@
|
| 344 |
|
} |
| 345 |
|
$query = \CouchbaseN1qlQuery::fromString($query); |
| 346 |
|
|
| 347 |
|
if ($this->breakingVersion()) { |
| 348 |
|
$query->consistency($this->consistency); |
| 349 |
|
$query->positionalParams($bindings); |
| 350 |
|
$bucket = $this->openBucket($this->bucket); |
| 351 |
|
$this->registerOption($bucket); |
| 352 |
|
$this->firePreparedQuery($query); |
| 353 |
|
$result = $bucket->query($query); |
| 354 |
|
$this->fireReturning($result); |
| 355 |
|
$this->metrics = (isset($result->metrics)) ? $result->metrics : []; |
| 356 |
|
|
| 357 |
|
return (isset($result->rows[0])) ? $result->rows[0] : false; |
| 358 |
|
} |
| 359 |
|
// @codeCoverageIgnoreStart |
| 360 |
|
$query->consistency($this->consistency); |
| 361 |
|
$query->options['args'] = $bindings; |