Closed jesjos closed 11 years ago
Okay so here's something akin to a wrapper API for doing a little more advanced queries without having to write actual SQL.
I have yet to hook it up to the models, but it should be straight forward.
Example query:
[[[[OPFComment query] whereColumn: @"post_id" is: @"2"] whereColumn: @"text" like: @"%%CSS%%"] whereColumn: @"user_id" in: @[@"1", @"2", @"3"]]
This will produce the following SQL:
"SELECT 'comments'.* FROM 'comments' WHERE ('comments'.'post_id' = 2 AND ('comments'.'text' LIKE '%CSS%' AND 'comments'.'user_id' IN (1,2,3)))"
Okay so here's something akin to a wrapper API for doing a little more advanced queries without having to write actual SQL.
I have yet to hook it up to the models, but it should be straight forward.
Example query:
This will produce the following SQL: