Skip to content

Releases: Serajian/go-query-builder

v1.0.1

13 Sep 11:43

Choose a tag to compare

qb v1.0.0

28 Aug 18:39

Choose a tag to compare

Highlights

  • Placeholder styles: DollarN (Postgres) / QuestionMark (MySQL/SQLite)
  • SELECT/INSERT/UPDATE/DELETE; JOIN, GROUP BY/HAVING, ORDER BY
  • RETURNING for INSERT/UPDATE/DELETE (Postgres, SQLite ≥ 3.35)
  • ON CONFLICT: DO NOTHING / DO UPDATE SET (Postgres/SQLite), with Excluded("col")
  • Guards: safe UPDATE/DELETE (adds WHERE 1=0) unless .Unsafe()
  • IN([]) → (1=0), NOT IN([]) → (1=1) (explicit, predictable semantics)
  • Deterministic arg order for INSERT/UPDATE (sorted keys)
  • INSERT with no values: DEFAULT VALUES (PG/SQLite) or () VALUES () (MySQL)
  • Tests + CI, MIT license

Compatibility Notes

  • MySQL generally doesn’t support RETURNING or ON CONFLICT; these are omitted when using QuestionMark placeholders.
  • For Postgres/SQLite, RETURNING and ON CONFLICT are rendered when DollarN is used.

Install
go get github.com/Serajian/query-builder-GO@v1.0.0

Thanks for trying qb — PRs and issues welcome!

v0.1.0

28 Aug 17:05

Choose a tag to compare

v0.1.0