evan108108/RESTFullYii — pull request #13 by drLev (2013-02-14 09:51:26+00:00)
Title: add operators in filter

Add filter oprators for using '<', '<=', '>', '>=', '<>', 'in', 'not in' and 'like' in filter.

Example :
filter = [
{"property": "id", "value" : 50, "operator": ">="}
, {"property": "user_id", "value" : [1, 5, 10, 14], "operator": "in"}
, {"property": "state", "value" : ["save", "deleted"], "operator": "not in"}
, {"property": "date", "value" : "2013-01-01", "operator": ">="}
, {"property": "date", "value" : "2013-01-31", "operator": "<="}
, {"property": "type", "value" : 2, "operator": "!="}
]
result =
(
t.id >= :id0
AND t.user_id IN (:user_id0_0, :user_id0_1, :user_id0_2, :user_id0_3)
AND t.state NOT IN (:state0_0, :state0_1)
AND t.date >= :date0
AND t.date <= :date1
AND t.type <> :type0
)