Skip to content

Releases: pocketbase/dbx

v1.12.0 Release

11 Feb 12:07

Choose a tag to compare

  • Introduced QueryBuilder.CombineUnion(sql string, unionClause string) string to allow specifying how the UNION/UNION ALL statements should be concatenated to the base query.
    To minimize breaking changes the default BaseQueryBuilder implementation is preserved as before - aka. wraps the left and right side of the combined queries in parenthesis (this is not a standard SQL format and it is mostly a MySQL quirk).

  • Use custom SqliteQueryBuilder for the SqliteBuilder that removes the default parenthesis wrapping of Union()/UnionAll() statements because otherwise it is causing syntax error (see pocketbase#7516).

v1.11.0 Release

10 Dec 19:04

Choose a tag to compare

  • Added 2 new helper functions for prepending/appending raw SQL statements to a dbx.SelectQuery (e.g. WITH clause):
    func (s *SelectQuery) PreFragment(fragment string) *SelectQuery
    func (s *SelectQuery) PostFragment(fragment string) *SelectQuery

v1.10.1 Release

17 Aug 08:15

Choose a tag to compare

  • Call db.Close() on db.MustOpen() failure in order to cleanup any previously opened resources (#4; thanks @afriza).

v1.10.0 Release

23 Feb 09:58

Choose a tag to compare

  • Added dbx.Query and dbx.SelectQuery hooks to allow composed app level fail/retry or any other custom query handling.

    func (q *Query) WithExecHook(fn ExecHookFunc) *Query
    func (q *Query) WithOneHook(fn OneHookFunc) *Query
    func (q *Query) WithAllHook(fn AllHookFunc) *Query
    func (q *SelectQuery) WithBuildHook(fn BuildHookFunc) *SelectQuery

v1.9.0 Release

26 Jan 17:17

Choose a tag to compare

  • Updated the default logger to print blob/rawbytes params as hex (#2).

  • Added dbx.Enclose(dbx.Expression) to enclose preemptively a nonempty expression with parenthesis.

v1.8.0 Release

05 Dec 11:41

Choose a tag to compare

  • Added optional dbx.PostScanner interface, allowing to attach custom behavior after struct scan (for both One and All).

v1.7.0 Release

30 Oct 06:49

Choose a tag to compare

  • Added SelectQuery.Info() helper to export the current query fields (eg. from, where, groupBy, etc.) without building the sql expression.

v1.6.0 Release

01 Jul 10:05

Choose a tag to compare

This is the fork first release.

The fork includes: