1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-16 11:04:43 +02:00

DibiTranslator: respect %if blocks for %lmt and %ofs as well [Closes #145][Closes #87]

This commit is contained in:
Martin Hradil
2014-08-26 23:29:17 +00:00
committed by David Grudl
parent 9189d56c05
commit d6826d62ed
2 changed files with 24 additions and 6 deletions

View File

@@ -74,3 +74,15 @@ WHERE
%if', FALSE, 'AND [admin]=1 %end
%else 1 LIMIT 10 %end'
));
// limit & offset
Assert::same(
'SELECT * FROM foo /* (limit 3) (offset 5) */',
$conn->translate(
'SELECT * FROM foo',
'%if', FALSE,
'%lmt', 3,
'%ofs', 5,
'%end'
));