1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-25 15:01:29 +02:00

- DibiPostgreDriver: schema is case-sensitive

- DibiTranslator: %n modifier can construct [table] AS t statements
This commit is contained in:
David Grudl
2009-02-02 17:50:02 +00:00
parent 5ecfaf7ab1
commit a5a1da19a7
4 changed files with 15 additions and 3 deletions

View File

@@ -227,6 +227,17 @@ final class DibiTranslator extends DibiObject
}
return implode($operator, $vx);
case 'n': // identifier names
foreach ($value as $k => $v) {
if (is_string($k)) {
$vx[] = $this->delimite($k) . ' AS ' . $v;
} else {
$vx[] = $this->delimite($v);
}
}
return implode(', ', $vx);
case 'a': // key=val, key=val, ...
foreach ($value as $k => $v) {
$pair = explode('%', $k, 2); // split into identifier & modifier