| @@ 382-397 (lines=16) @@ | ||
| 379 | * @param int $errorLevel The level of error reporting to enable for the query |
|
| 380 | * @return SS_Query |
|
| 381 | */ |
|
| 382 | public function preparedQuery($sql, $parameters, $errorLevel = E_USER_ERROR) |
|
| 383 | { |
|
| 384 | // Check if we should only preview this query |
|
| 385 | if ($this->previewWrite($sql)) { |
|
| 386 | return; |
|
| 387 | } |
|
| 388 | ||
| 389 | // Benchmark query |
|
| 390 | $connector = $this->connector; |
|
| 391 | return $this->benchmarkQuery( |
|
| 392 | array($sql, $parameters), |
|
| 393 | function ($sql) use ($connector, $parameters, $errorLevel) { |
|
| 394 | return $connector->preparedQuery($sql, $parameters, $errorLevel); |
|
| 395 | } |
|
| 396 | ); |
|
| 397 | } |
|
| 398 | ||
| 399 | /** |
|
| 400 | * @return array |
|
| @@ 354-369 (lines=16) @@ | ||
| 351 | * @param int $errorLevel The level of error reporting to enable for the query |
|
| 352 | * @return SS_Query |
|
| 353 | */ |
|
| 354 | public function preparedQuery($sql, $parameters, $errorLevel = E_USER_ERROR) |
|
| 355 | { |
|
| 356 | // Check if we should only preview this query |
|
| 357 | if ($this->previewWrite($sql)) { |
|
| 358 | return; |
|
| 359 | } |
|
| 360 | ||
| 361 | // Benchmark query |
|
| 362 | $connector = $this->connector; |
|
| 363 | return $this->benchmarkQuery( |
|
| 364 | $sql, |
|
| 365 | function ($sql) use ($connector, $parameters, $errorLevel) { |
|
| 366 | return $connector->preparedQuery($sql, $parameters, $errorLevel); |
|
| 367 | } |
|
| 368 | ); |
|
| 369 | } |
|
| 370 | ||
| 371 | /** |
|
| 372 | * @return array |
|