| @@ 129-152 (lines=24) @@ | ||
| 126 | /** |
|
| 127 | * {@inheritdoc} |
|
| 128 | */ |
|
| 129 | public function statement($query, $bindings = []) |
|
| 130 | { |
|
| 131 | return $this->run($query, $bindings, function ($query, $bindings) { |
|
| 132 | if ($this->pretending()) { |
|
| 133 | return true; |
|
| 134 | } |
|
| 135 | ||
| 136 | $query = $this->prepareBindingsInQuery($query); |
|
| 137 | $options = [ |
|
| 138 | 'query' => $query, |
|
| 139 | 'count' => true, |
|
| 140 | 'batchSize' => 1000, |
|
| 141 | 'sanitize' => true, |
|
| 142 | ]; |
|
| 143 | ||
| 144 | if (count($bindings) > 0) { |
|
| 145 | $options['bindVars'] = $this->prepareBindings($bindings); |
|
| 146 | } |
|
| 147 | ||
| 148 | $statement = new Statement($this->getArangoClient(), $options); |
|
| 149 | ||
| 150 | return $statement->execute(); |
|
| 151 | }); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * {@inheritdoc} |
|
| @@ 157-177 (lines=21) @@ | ||
| 154 | /** |
|
| 155 | * {@inheritdoc} |
|
| 156 | */ |
|
| 157 | public function affectingStatement($query, $bindings = []) |
|
| 158 | { |
|
| 159 | return $this->run($query, $bindings, function ($query, $bindings) { |
|
| 160 | $query = $this->prepareBindingsInQuery($query); |
|
| 161 | ||
| 162 | $options = [ |
|
| 163 | 'query' => $query, |
|
| 164 | 'count' => true, |
|
| 165 | 'batchSize' => 1000, |
|
| 166 | 'sanitize' => true, |
|
| 167 | ]; |
|
| 168 | ||
| 169 | if (count($bindings) > 0) { |
|
| 170 | $options['bindVars'] = $this->prepareBindings($bindings); |
|
| 171 | } |
|
| 172 | ||
| 173 | $statement = new Statement($this->getArangoClient(), $options); |
|
| 174 | ||
| 175 | return $statement->execute(); |
|
| 176 | }); |
|
| 177 | } |
|
| 178 | ||
| 179 | /** |
|
| 180 | * Get Arango.DB |
|