@@ -45,6 +45,30 @@ func Not[T bob.Expression, B builder[T]](exp bob.Expression) T {
4545 return b .New (Join {Exprs : []bob.Expression {not , X [T , B ](exp )}})
4646}
4747
48+ // Exists expression
49+ func Exists [T bob.Expression , B builder [T ]](exp bob.Expression ) T {
50+ var b B
51+ return b .New (Join {Exprs : []bob.Expression {exists , group {exp }}})
52+ }
53+
54+ // prefix the expression with a - (minus)
55+ func Minus [T bob.Expression , B builder [T ]](exp bob.Expression ) T {
56+ var b B
57+ return b .New (Join {Exprs : []bob.Expression {minus , X [T , B ](exp )}})
58+ }
59+
60+ // ANY expression
61+ func Any [T bob.Expression , B builder [T ]](exp bob.Expression ) T {
62+ var b B
63+ return b .New (Join {Exprs : []bob.Expression {anyOp , group {exp }}})
64+ }
65+
66+ // ALL expression
67+ func All [T bob.Expression , B builder [T ]](exp bob.Expression ) T {
68+ var b B
69+ return b .New (Join {Exprs : []bob.Expression {all , group {exp }}})
70+ }
71+
4872// To be embedded in query mods
4973// T is the chain type, this allows dialects to have custom chain methods
5074// F is function type, so that the dialect can change where it
@@ -107,3 +131,23 @@ func (e Builder[T, B]) Quote(aa ...string) T {
107131func (e Builder [T , B ]) Cast (exp bob.Expression , typname string ) T {
108132 return X [T , B ](Cast (exp , typname ))
109133}
134+
135+ // EXISTS expression
136+ func (e Builder [T , B ]) Exists (exp bob.Expression ) T {
137+ return Exists [T , B ](exp )
138+ }
139+
140+ // prefix the expression with a - (minus)
141+ func (e Builder [T , B ]) Minus (exp bob.Expression ) T {
142+ return Minus [T , B ](exp )
143+ }
144+
145+ // ANY expression
146+ func (e Builder [T , B ]) Any (exp bob.Expression ) T {
147+ return Any [T , B ](exp )
148+ }
149+
150+ // ALL expression
151+ func (e Builder [T , B ]) All (exp bob.Expression ) T {
152+ return All [T , B ](exp )
153+ }
0 commit comments