mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-05-23 00:03:36 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f647ca094 |
@@ -26,6 +26,10 @@ func Compose(filters ...interface{}) *Query {
|
|||||||
// Push applies single filter to a query
|
// Push applies single filter to a query
|
||||||
func Push(q *Query, f interface{}) bool {
|
func Push(q *Query, f interface{}) bool {
|
||||||
|
|
||||||
|
if f == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
ok := false
|
ok := false
|
||||||
ok = ok || applyBson(q, f)
|
ok = ok || applyBson(q, f)
|
||||||
ok = ok || applyLimit(q, f)
|
ok = ok || applyLimit(q, f)
|
||||||
@@ -91,9 +95,6 @@ func applyProtection(q *Query, f interface{}) bool {
|
|||||||
x = &f.X
|
x = &f.X
|
||||||
v = &f.V
|
v = &f.V
|
||||||
case *protection.Key:
|
case *protection.Key:
|
||||||
if f == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
x = &f.X
|
x = &f.X
|
||||||
v = &f.V
|
v = &f.V
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user