Closed gustavohmsilva closed 2 years ago
Hi @gustavohmsilva,
As @lann replied here: #180
You can get the same effect with e.g. sq.Expr("x BETWEEN ? AND ?", low, high)
Works fine, and the other way around too:
sq.Expr("? BETWEEN col_min AND col_max", x)
Hi @gustavohmsilva,
As @lann replied here: #180
You can get the same effect with e.g. sq.Expr("x BETWEEN ? AND ?", low, high)
Works fine, and the other way around too:
sq.Expr("? BETWEEN col_min AND col_max", x)
It's work for me, and it even work with custom PlaceholderFormat(squirrel.Dollar)
Hi all,
Currently, we have been using Expr function to generate a SQL with BETWEEN, or, depending on the circunstances, we've been using a combination of And{} and LtOrEq{} and GtOrEq{} to reproduce the same thing. This is tho somewhat janky as the first is against the idea of Squirrel (minimize SQL written in Go Codebase) and the second, overly complicated.
Would it be worth consideration by the mantainers to develop squirrel.Between{} in Squirrel?