| @@ 286-301 (lines=16) @@ | ||
| 283 | * |
|
| 284 | * @return bool |
|
| 285 | */ |
|
| 286 | public function statement($query, $bindings = [], array $customOptions = []) |
|
| 287 | { |
|
| 288 | return $this->run($query, $bindings, function ($query, $bindings) use ($customOptions) { |
|
| 289 | if ($this->pretending()) { |
|
| 290 | return []; |
|
| 291 | } |
|
| 292 | ||
| 293 | $preparedStatement = $this->session->prepare($query); |
|
| 294 | //$this->recordsHaveBeenModified(); |
|
| 295 | ||
| 296 | //Add bindings |
|
| 297 | $customOptions['arguments'] = $bindings; |
|
| 298 | ||
| 299 | return $this->session->execute($preparedStatement, $customOptions); |
|
| 300 | }); |
|
| 301 | } |
|
| 302 | ||
| 303 | /** |
|
| 304 | * Because Cassandra is an eventually consistent database, it's not possible to obtain |
|
| @@ 314-331 (lines=18) @@ | ||
| 311 | * |
|
| 312 | * @return int |
|
| 313 | */ |
|
| 314 | public function affectingStatement($query, $bindings = [], array $customOptions = []) |
|
| 315 | { |
|
| 316 | return $this->run($query, $bindings, function ($query, $bindings) { |
|
| 317 | if ($this->pretending()) { |
|
| 318 | return 0; |
|
| 319 | } |
|
| 320 | ||
| 321 | $preparedStatement = $this->session->prepare($query); |
|
| 322 | //$this->recordsHaveBeenModified(); |
|
| 323 | ||
| 324 | //Add bindings |
|
| 325 | $customOptions['arguments'] = $bindings; |
|
| 326 | ||
| 327 | $this->session->execute($preparedStatement, $customOptions); |
|
| 328 | ||
| 329 | return 1; |
|
| 330 | }); |
|
| 331 | } |
|
| 332 | ||
| 333 | /** |
|
| 334 | * @inheritdoc |
|