qcodo/qcodo — pull request #27 by cdhamm (2012-10-29 02:06:35+00:00)
Title: Added QQuery support for SET column types.

Hi Mike, thought you might be interested in this. This tweak add support for Mysql FIND_IN_SET:
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_find-in-set

Used against SET columns:
http://dev.mysql.com/doc/refman/5.0/en/set.html

-----
FindInSet Example:
For column :
`permissions` SET('admin', 'user') NULL

The QQuery equivalent of:
select * from user where find_in_set('admin', permissions);

Looks like:
User::QuerySingle(QQ::FindInSet(QQN::User()->Permissions, 'admin'));

NotFindInSet Example:
The QQuery equivalent of:
select * from user where NOT find_in_set('admin', permissions);

Looks like:
User::QuerySingle(QQ::NotFindInSet(QQN::User()->Permissions, 'admin'));
----

QQ::FindInSet(, )
and
QQ::NotFindInSetQQ::FindInSet(, )