mirror of
https://github.com/dg/dibi.git
synced 2025-08-11 08:34:59 +02:00
Translator: added %N
This commit is contained in:
@@ -380,9 +380,12 @@ final class Translator
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'by':
|
case 'by':
|
||||||
case 'n': // identifier name
|
case 'n': // composed identifier name
|
||||||
return $this->identifiers->$value;
|
return $this->identifiers->$value;
|
||||||
|
|
||||||
|
case 'N': // identifier name
|
||||||
|
return $this->driver->escapeIdentifier($value);
|
||||||
|
|
||||||
case 'ex':
|
case 'ex':
|
||||||
case 'sql': // preserve as dibi-SQL (TODO: leave only %ex)
|
case 'sql': // preserve as dibi-SQL (TODO: leave only %ex)
|
||||||
$value = (string) $value;
|
$value = (string) $value;
|
||||||
|
@@ -542,6 +542,12 @@ Assert::same(
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Assert::same(
|
||||||
|
reformat('SELECT [a].[b] AS [c.d]'),
|
||||||
|
$conn->translate('SELECT %n AS %N', 'a.b', 'c.d')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
setLocale(LC_ALL, 'czech');
|
setLocale(LC_ALL, 'czech');
|
||||||
|
|
||||||
Assert::same(
|
Assert::same(
|
||||||
|
Reference in New Issue
Block a user