mirror of
https://github.com/dg/dibi.git
synced 2025-08-25 15:01:29 +02:00
- DibiPostgreDriver - workaround for bug in pg_affected_rows
- added DibiResult::setObjects([TRUE | FALSE | class name])
This commit is contained in:
@@ -119,16 +119,16 @@ final class DibiTranslator extends /*Nette::*/Object
|
||||
} else {
|
||||
$sql[] = substr($arg, 0, $toSkip)
|
||||
/*
|
||||
. preg_replace_callback('/
|
||||
(?=`|\[|\'|"|%) ## speed-up
|
||||
(?:
|
||||
`(.+?)`| ## 1) `identifier`
|
||||
\[(.+?)\]| ## 2) [identifier]
|
||||
(\')((?:\'\'|[^\'])*)\'| ## 3,4) string
|
||||
(")((?:""|[^"])*)"| ## 5,6) "string"
|
||||
(\'|") ## 7) lone-quote
|
||||
%([a-zA-Z]{1,4})(?![a-zA-Z])|## 8) modifier
|
||||
)/xs',
|
||||
preg_replace_callback('/
|
||||
(?=`|\[|\'|"|%) ## speed-up
|
||||
(?:
|
||||
`(.+?)`| ## 1) `identifier`
|
||||
\[(.+?)\]| ## 2) [identifier]
|
||||
(\')((?:\'\'|[^\'])*)\'| ## 3,4) string
|
||||
(")((?:""|[^"])*)"| ## 5,6) "string"
|
||||
(\'|") ## 7) lone-quote
|
||||
%([a-zA-Z]{1,4})(?![a-zA-Z])|## 8) modifier
|
||||
)/xs',
|
||||
*/ // note: this can change $this->args & $this->cursor & ...
|
||||
. preg_replace_callback('/(?=`|\[|\'|"|%)(?:`(.+?)`|\[(.+?)\]|(\')((?:\'\'|[^\'])*)\'|(")((?:""|[^"])*)"|(\'|")|%([a-zA-Z]{1,4})(?![a-zA-Z]))/s',
|
||||
array($this, 'cb'),
|
||||
|
Reference in New Issue
Block a user