New feature: Ignore empty content to prevent the output of incorrect SQL
What's Changed
Cond
andWhereClause
will actively ignore empty content to prevent the output of syntactically incorrect SQL #175 by @rodionovv- In previous version,
Cond
andWhereClause
can produce syntax errors when any of required parametersfield
,op
orexpr
is empty. This release fixes this issue by actively ignore these invalid values. - Here are samples affected by this change.
Select("*").From("t").Where("").String()
- Now:
SELECT * FROM t
- Previous version:
SELECT * FROM t WHERE
- Now:
sb := Select("*").From("t"); sb.Where(sb.Equal("", 0))
- Now:
SELECT * FROM t
- Previous version:
SELECT * FROM t WHERE = ?
- Now:
- In previous version,
New Contributors
- @rodionovv made their first contribution in #175
Full Changelog: v1.30.0...v1.31.0