mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 22:26:43 +02:00
Translator: improved Expression usage
This commit is contained in:
@@ -507,6 +507,18 @@ Assert::same(
|
||||
);
|
||||
|
||||
|
||||
Assert::same(
|
||||
reformat('SELECT * FROM [table] WHERE (([left] = 1) OR ([top] = 2)) AND (number < 100)'),
|
||||
$conn->translate('SELECT * FROM `table` WHERE %and', [
|
||||
new Dibi\Expression('%or', [
|
||||
'left' => 1,
|
||||
'top' => 2,
|
||||
]),
|
||||
new Dibi\Expression('number < %i', 100),
|
||||
])
|
||||
);
|
||||
|
||||
|
||||
$e = Assert::exception(function () use ($conn) {
|
||||
$array6 = [
|
||||
'id' => [1, 2, 3, 4],
|
||||
|
Reference in New Issue
Block a user