Roave / RoaveDbCriteria

Use Doctrine Collections expressions with Zend\Db\Sql for smart criteria / filtering / query building.
MIT License
6 stars 2 forks source link

Value types used in comparison expressions might be of unsupported type #6

Open Xerkus opened 10 years ago

Xerkus commented 10 years ago

Values passed for comparison might be arrays or objects, while zend\db predicates expect strings.

This needs to be handled. One way to go might be to introduce some abstract decorator visitor to convert values/expressions for underlying zend\db visitor

Ocramius commented 10 years ago

@Xerkus it can really just be a value visitor (that does visitValue) - for this, we can simply reuse the existing DBAL types, as they are quite solid.

Xerkus commented 10 years ago

my thought is that it can possibly change type of expression as well

Ocramius commented 10 years ago

@Xerkus nah, that doesn't really happen unless you have some weird stored procedures that use values with multiple parameter binding. Except for array types, all the value types bind to a single scalar.

Worst case scenarios are LOB types, which are DB specific and cannot really be abstracted.