@@ 192-208 (lines=17) @@ | ||
189 | return 'LIMIT '.$sql; |
|
190 | } |
|
191 | ||
192 | protected function processGROUP($parsed) |
|
193 | { |
|
194 | $sql = ''; |
|
195 | foreach ($parsed as $k => $v) { |
|
196 | $len = strlen($sql); |
|
197 | $sql .= $this->processColRef($v); |
|
198 | ||
199 | if ($len == strlen($sql)) { |
|
200 | throw new UnableToCreateSQLException('GROUP', $k, $v, 'expr_type'); |
|
201 | } |
|
202 | ||
203 | $sql .= ','; |
|
204 | } |
|
205 | $sql = substr($sql, 0, -1); |
|
206 | ||
207 | return 'GROUP BY '.$sql; |
|
208 | } |
|
209 | ||
210 | protected function processRecord($parsed) |
|
211 | { |
|
@@ 233-249 (lines=17) @@ | ||
230 | return '('.$sql.')'; |
|
231 | } |
|
232 | ||
233 | protected function processVALUES($parsed) |
|
234 | { |
|
235 | $sql = ''; |
|
236 | foreach ($parsed as $k => $v) { |
|
237 | $len = strlen($sql); |
|
238 | $sql .= $this->processRecord($v); |
|
239 | ||
240 | if ($len == strlen($sql)) { |
|
241 | throw new UnableToCreateSQLException('VALUES', $k, $v, 'expr_type'); |
|
242 | } |
|
243 | ||
244 | $sql .= ','; |
|
245 | } |
|
246 | $sql = substr($sql, 0, -1); |
|
247 | ||
248 | return 'VALUES '.$sql; |
|
249 | } |
|
250 | ||
251 | protected function processINSERT($parsed) |
|
252 | { |
|
@@ 310-325 (lines=16) @@ | ||
307 | return $sql; |
|
308 | } |
|
309 | ||
310 | protected function processSET($parsed) |
|
311 | { |
|
312 | $sql = ''; |
|
313 | foreach ($parsed as $k => $v) { |
|
314 | $len = strlen($sql); |
|
315 | $sql .= $this->processSetExpression($v); |
|
316 | ||
317 | if ($len == strlen($sql)) { |
|
318 | throw new UnableToCreateSQLException('SET', $k, $v, 'expr_type'); |
|
319 | } |
|
320 | ||
321 | $sql .= ','; |
|
322 | } |
|
323 | ||
324 | return 'SET '.substr($sql, 0, -1); |
|
325 | } |
|
326 | ||
327 | protected function processWHERE($parsed) |
|
328 | { |