Create some sort of ConditionExpression, that will generate SQL expression IS NULL or expression = ? or expression IN (?, ?, ...) for all conditions without specified ? in it and will keep original expression where ? is included. Than we can use in Complex on another Complex or this ConditionExpression and in QueryBuilder we can use this to simplify building complex into SQL.
Create it in a way, where anybody can use this In Fluent\Query everywhere. Look at Db\Sql interface, how it's use. This new ConditionExpression can be used in the same way as Fluent\Query, it can generate SQL, so it could share some interface with creating SQL method.
Create some sort of
ConditionExpression
, that will generate SQLexpression IS NULL
orexpression = ?
orexpression IN (?, ?, ...)
for all conditions without specified?
in it and will keep original expression where?
is included. Than we can use inComplex
on anotherComplex
or thisConditionExpression
and inQueryBuilder
we can use this to simplify building complex into SQL.Create it in a way, where anybody can use this In
Fluent\Query
everywhere. Look atDb\Sql
interface, how it's use. This newConditionExpression
can be used in the same way asFluent\Query
, it can generate SQL, so it could share some interface with creating SQL method.