You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I plan to support EXISTS, NOT EXISTS, ANY, SOME and ALL in builders which have WHERE clause. I'll finish it in this weekend.
Before that, you can simply write code like following.
sb:=sqlbuilder.Select("col").From("table1")
subquery:=sqlbuilder.Select("1").From("table2").Where("status = 1")
// Use sb.Var() and Buildf to build EXISTS clause.sb.Where(
sb.Var(sqlbuilder.Buildf("EXISTS(%v)", subquery)),
)
println(sb.String())
// Output:// SELECT col FROM table1 WHERE EXISTS(SELECT 1 FROM table2 WHERE status = 1)
I didn't find a
builder.Exists()
method in the codebase. Is there a way to accomplish this?The text was updated successfully, but these errors were encountered: