mirror of
https://github.com/dg/dibi.git
synced 2025-08-13 09:34:30 +02:00
Translator, Fluent: preserve dot in name after AS [Closes #224]
This commit is contained in:
@@ -26,19 +26,19 @@ Assert::same(
|
||||
(string) $fluent
|
||||
);
|
||||
|
||||
$fluent->from('table')->as('tableAlias')
|
||||
$fluent->from('table')->as('table.Alias')
|
||||
->innerJoin('table1')->on('table.col = table1.col')
|
||||
->innerJoin('table2')->on('table.col = table2.col');
|
||||
|
||||
Assert::same(
|
||||
reformat('SELECT * , [a] , [b] AS [bAlias] , [c], [d], [e] , [d] FROM [table] AS [tableAlias] INNER JOIN [table1] ON table.col = table1.col INNER JOIN [table2] ON table.col = table2.col'),
|
||||
reformat('SELECT * , [a] , [b] AS [bAlias] , [c], [d], [e] , [d] FROM [table] AS [table.Alias] INNER JOIN [table1] ON table.col = table1.col INNER JOIN [table2] ON table.col = table2.col'),
|
||||
(string) $fluent
|
||||
);
|
||||
|
||||
$fluent->from('anotherTable');
|
||||
|
||||
Assert::same(
|
||||
reformat('SELECT * , [a] , [b] AS [bAlias] , [c], [d], [e] , [d] FROM [table] AS [tableAlias] INNER JOIN [table1] ON table.col = table1.col INNER JOIN [table2] ON table.col = table2.col , [anotherTable]'),
|
||||
reformat('SELECT * , [a] , [b] AS [bAlias] , [c], [d], [e] , [d] FROM [table] AS [table.Alias] INNER JOIN [table1] ON table.col = table1.col INNER JOIN [table2] ON table.col = table2.col , [anotherTable]'),
|
||||
(string) $fluent
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user