mirror of
https://github.com/dg/dibi.git
synced 2025-08-09 15:47:23 +02:00
Translator: added %N
This commit is contained in:
@@ -380,9 +380,12 @@ final class Translator
|
||||
}
|
||||
|
||||
case 'by':
|
||||
case 'n': // identifier name
|
||||
case 'n': // composed identifier name
|
||||
return $this->identifiers->$value;
|
||||
|
||||
case 'N': // identifier name
|
||||
return $this->driver->escapeIdentifier($value);
|
||||
|
||||
case 'ex':
|
||||
case 'sql': // preserve as dibi-SQL (TODO: leave only %ex)
|
||||
$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');
|
||||
|
||||
Assert::same(
|
||||
|
Reference in New Issue
Block a user