You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With 8ce7d5c, 12a46ca and 0a68c04 I've added classes that resemble specific SQL where expressions. But these are currently implemented in a way they play fine with other code handling filters. (e.g. ipl\Orm\Compat\FilterProcessor) This leads to unnecessary cases like this and of course bogus interface implementations. (All of them have either no value or no column)
What I'd like to see is a more generic filter object that can handle all of these cases (plus more) and plays fine with other code handling filter objects. Heck, it should even be possible to still make use of things like RewriteFilter objects so that the columns and values of a expression are processed.
useipl\Sql\Filter\Expression;
// ipl\Sql\Select objects would need to be handled just like columns, because objects can't be keys.....$exists = newExpression('EXISTS(%s)', [ipl\Sql\Select]);
$notExists = newExpression('NOT EXISTS(%s)', [ipl\Sql\Select]);
// Values are processed just as usual, columns will be inserted into the statement by the object itself.// Separating them anyway allows pre-processing to happen.$isNull = newExpression('%s IS NULL', ['id' => null]);
$case = newExpression('CASE WHEN %s = ? OR %s = ? THEN 1 ELSE 0 END', ['name' => 'foo', 'name' => 'bar']);
The text was updated successfully, but these errors were encountered:
With 8ce7d5c, 12a46ca and
0a68c04I've added classes that resemble specific SQL where expressions. But these are currently implemented in a way they play fine with other code handling filters. (e.g.ipl\Orm\Compat\FilterProcessor
) This leads to unnecessary cases like this and of course bogus interface implementations. (All of them have either novalue
or nocolumn
)What I'd like to see is a more generic filter object that can handle all of these cases (plus more) and plays fine with other code handling filter objects. Heck, it should even be possible to still make use of things like
RewriteFilter
objects so that the columns and values of a expression are processed.My first concept of this object looks like this:
Usage would look this way:
The text was updated successfully, but these errors were encountered: