orm: support filter raw sql

This commit is contained in:
nukc
2018-11-05 03:47:21 +08:00
parent f64e6b72e9
commit 736e66fcda
5 changed files with 49 additions and 1 deletions

View File

@@ -147,6 +147,11 @@ type QuerySeter interface {
// // time compare
// qs.Filter("created", time.Now())
Filter(string, ...interface{}) QuerySeter
// add raw sql to querySeter.
// for example:
// qs.FilterRaw("user_id IN (SELECT id FROM profile WHERE age>=18)")
// //sql-> WHERE user_id IN (SELECT id FROM profile WHERE age>=18)
FilterRaw(string, string) QuerySeter
// add NOT condition to querySeter.
// have the same usage as Filter
Exclude(string, ...interface{}) QuerySeter