squirrel icon indicating copy to clipboard operation
squirrel copied to clipboard

Question about tuple IN condition

Open rolancia opened this issue 1 year ago • 0 comments

i've read #104

Expr("(name, age) IN ((?, ?), (?, ?))", "Alex", 10, "Douglas", 40)

works well, but i wonder why you did not wrap it as below.

var _ Sqlizer = &TupleIn{}

type TupleIn struct {
	Cols []string
	Vals []any
}

func (t TupleIn) ToSql() (string, []interface{}, error) {
        return Expr(...)
}

rolancia avatar Mar 29 '23 09:03 rolancia