mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
DibiTranslator: supported key%~like~ modifier in array keys
This commit is contained in:
@@ -218,7 +218,16 @@ final class DibiTranslator extends DibiObject
|
||||
|
||||
} else {
|
||||
$v = $this->formatValue($v, $pair[1]);
|
||||
$vx[] = $k . ($pair[1] === 'l' || $pair[1] === 'in' ? 'IN ' : ($v === 'NULL' ? 'IS ' : '= ')) . $v;
|
||||
if ($pair[1] === 'l' || $pair[1] === 'in') {
|
||||
$op = 'IN ';
|
||||
} elseif (strpos($pair[1], 'like') !== FALSE) {
|
||||
$op = 'LIKE ';
|
||||
} elseif ($v === 'NULL') {
|
||||
$op = 'IS ';
|
||||
} else {
|
||||
$op = '= ';
|
||||
}
|
||||
$vx[] = $k . $op . $v;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user