forked from chuckpreslar/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlike.go
More file actions
30 lines (25 loc) · 775 Bytes
/
like.go
File metadata and controls
30 lines (25 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package codex
// LikeNode is a BinaryNode struct
type LikeNode BinaryNode
// Returns a Grouping node with an expression containing a
// reference to an Or node of the Like and other.
func (self *LikeNode) Or(other interface{}) *GroupingNode {
return Grouping(Or(self, other))
}
// Returns a Grouping node with an expression containing a
// reference to an And node of the Like and other.
func (self *LikeNode) And(other interface{}) *GroupingNode {
return Grouping(And(self, other))
}
// Returns an Not node with and expression containing the
// Like node.
func (self *LikeNode) Not() *NotNode {
return Not(self)
}
// LikeNode factory method.
func Like(left, right interface{}) (like *LikeNode) {
like = new(LikeNode)
like.Left = left
like.Right = right
return
}