Skip to content

Commit 793b804

Browse files
committed
feat: remove SOME expression as a synonym of ANY
1 parent 0d6ebc3 commit 793b804

File tree

4 files changed

+0
-24
lines changed

4 files changed

+0
-24
lines changed

dialect/mysql/starters.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,6 @@ func Any(exp bob.Expression) bob.Expression {
125125
return bmod.Any(exp)
126126
}
127127

128-
// SQL: a = SOME((SELECT name FROM users))
129-
// Go: mysql.Quote("a").EQ(mysql.Some(mysql.Select(sm.Columns("name"), sm.From("users"))))
130-
func Some(exp bob.Expression) bob.Expression {
131-
return bmod.Some(exp)
132-
}
133-
134128
// SQL: a = ALL((SELECT name FROM users))
135129
// Go: mysql.Quote("a").EQ(mysql.All(mysql.Select(sm.Columns("name"), sm.From("users"))))
136130
func All(exp bob.Expression) bob.Expression {

dialect/psql/starters.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,6 @@ func Any(exp bob.Expression) bob.Expression {
125125
return bmod.Any(exp)
126126
}
127127

128-
// SQL: a = SOME((SELECT name FROM users))
129-
// Go: psql.Quote("a").EQ(psql.Some(psql.Select(sm.Columns("name"), sm.From("users"))))
130-
func Some(exp bob.Expression) bob.Expression {
131-
return bmod.Some(exp)
132-
}
133-
134128
// SQL: a = ALL((SELECT name FROM users))
135129
// Go: psql.Quote("a").EQ(psql.All(psql.Select(sm.Columns("name"), sm.From("users"))))
136130
func All(exp bob.Expression) bob.Expression {

expr/builder.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ func Any[T bob.Expression, B builder[T]](exp bob.Expression) T {
6363
return b.New(Join{Exprs: []bob.Expression{anyOp, group{exp}}})
6464
}
6565

66-
// SOME expression
67-
func Some[T bob.Expression, B builder[T]](exp bob.Expression) T {
68-
var b B
69-
return b.New(Join{Exprs: []bob.Expression{some, group{exp}}})
70-
}
71-
7266
// ALL expression
7367
func All[T bob.Expression, B builder[T]](exp bob.Expression) T {
7468
var b B
@@ -153,11 +147,6 @@ func (e Builder[T, B]) Any(exp bob.Expression) T {
153147
return Any[T, B](exp)
154148
}
155149

156-
// SOME expression
157-
func (e Builder[T, B]) Some(exp bob.Expression) T {
158-
return Some[T, B](exp)
159-
}
160-
161150
// ALL expression
162151
func (e Builder[T, B]) All(exp bob.Expression) T {
163152
return All[T, B](exp)

expr/constants.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ var (
2121
exists = Raw("EXISTS")
2222
minus = Raw("-")
2323
anyOp = Raw("ANY")
24-
some = Raw("SOME")
2524
all = Raw("ALL")
2625
)

0 commit comments

Comments
 (0)