good morning!!!!

Skip to content
Snippets Groups Projects
Commit 47c8bfb8 authored by Peter Kieltyka's avatar Peter Kieltyka
Browse files

Accept array of conditions, however, we can do much better

parent f72a2f4a
No related branches found
No related tags found
No related merge requests found
...@@ -100,8 +100,8 @@ type Func struct { ...@@ -100,8 +100,8 @@ type Func struct {
// } // }
type And []interface{} type And []interface{}
func (a And) And(exp interface{}) And { func (a And) And(exp ...interface{}) And {
return append(a, exp) return append(a, exp...)
} }
// Or is an array of interfaced that is used to join two or more expressions // Or is an array of interfaced that is used to join two or more expressions
...@@ -117,8 +117,8 @@ func (a And) And(exp interface{}) And { ...@@ -117,8 +117,8 @@ func (a And) And(exp interface{}) And {
// } // }
type Or []interface{} type Or []interface{}
func (o Or) Or(exp interface{}) Or { func (o Or) Or(exp ...interface{}) Or {
return append(o, exp) return append(o, exp...)
} }
// Raw holds chunks of data to be passed to the database without any filtering. // Raw holds chunks of data to be passed to the database without any filtering.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment