carno-php /
database
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * SQL executor |
||||
| 4 | * User: moyo |
||||
| 5 | * Date: 02/11/2017 |
||||
| 6 | * Time: 6:00 PM |
||||
| 7 | */ |
||||
| 8 | |||||
| 9 | namespace Carno\Database\Chips; |
||||
| 10 | |||||
| 11 | use Carno\Database\Results\Created; |
||||
| 12 | use Carno\Database\Results\Selected; |
||||
| 13 | use Carno\Database\Results\Updated; |
||||
| 14 | use Carno\Pool\Wrapper\SAR; |
||||
| 15 | use Carno\Pool\Wrapper\SRD; |
||||
| 16 | |||||
| 17 | trait SQLExecutor |
||||
| 18 | { |
||||
| 19 | use SAR, SRD; |
||||
| 20 | |||||
| 21 | /** |
||||
| 22 | * @param string $sql |
||||
| 23 | * @param array $bind |
||||
| 24 | * @return Created|Updated|Selected |
||||
| 25 | */ |
||||
| 26 | public function execute(string $sql, array $bind = []) |
||||
| 27 | { |
||||
| 28 | return $this->sarRun($this->assigned($sql), 'execute', [$sql, $bind]); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 29 | } |
||||
| 30 | |||||
| 31 | /** |
||||
| 32 | * @deprecated |
||||
| 33 | * @param string $data |
||||
| 34 | * @return string |
||||
| 35 | */ |
||||
| 36 | public function escape(string $data) : string |
||||
| 37 | { |
||||
| 38 | return $this->rndRun($this->assigned(), 'escape', [$data]); |
||||
|
0 ignored issues
–
show
The function
Carno\Database\Chips\SQLExecutor::rndRun() has been deprecated.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 39 | } |
||||
| 40 | } |
||||
| 41 |