Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: huandu/go-sqlbuilder

v1.41.0

03 May 13:14
@huandu huandu

Choose a tag to compare

  • [NEW] Add an option NoExpand to change default field "expand" behavior for backward compatibility. See #237 for details.

NOTE: Starting from v1.40.0, the Struct utility type defaults to expanding non-primitive struct fields. This change caused unexpected behavior for some users. To address this without reverting the features introduced in v1.40.0, we have introduced a NoExpand configuration. When set to true, all fields will default to no expansion (preserving legacy behavior). You can still opt-in to expansion for specific fields by using the fieldopt:"expand" tag.

Full Changelog: v1.40.0...v1.41.0

Assets 2
Loading

v1.40.0

20 Mar 12:53
@huandu huandu

Choose a tag to compare

What's new

Struct field / db tag improvements

Support treating a db tag on a struct-typed field as a database alias and expanding its exported fields as aliased columns. This makes it possible to build JOIN projections like post.id, post.title, etc., from a nested struct field and keeps Addr/Scan behavior working by allocating nested pointers when scanning.

Note: This change preserves existing semantics for scalar-like structs (types implementing sql.Scanner/driver.Valuer/time.Time, etc) — they are not expanded.

See issue #233 for more details.

Oracle SELECT behavior

Use OFFSET ... FETCH pattern for Oracle SELECT pagination.

Potential Oracle compatibility note: the change to use OFFSET ... FETCH for Oracle pagination may affect environments using older Oracle versions that do not support this syntax. Please verify compatibility with your Oracle version before upgrading.

Thanks and acknowledgements

Thanks to @zhangyongding for the Oracle pagination improvements.

Full Changelog: v1.39.0...v1.40.0

Contributors

deanz-io
Loading

v1.39.0

20 Jan 07:45
@huandu huandu
03c69da
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

  • [NEW] Add From support for UpdateBuilder by @stvnkiss in #230
  • [FIX] Fix oracle limit bug by @zhangyongding in #222
  • [FIX] Improve error-msg context for unsupported types during interpolation by @shoriwe in #226
  • [FIX] Mark OrderBy as "not recommended" rather than deprecated by in #223
  • [FIX] Fix sqlite string interpolation incorrectly uses backslash escapes by @shoriwe in #228
  • [FIX] Update doc on Where to avoid confusion in #229

New Contributors

Full Changelog: v1.38.0...v1.39.0

Contributors

shoriwe, deanz-io, and stvnkiss
Loading

v1.38.0

10 Oct 08:31
@huandu huandu

Choose a tag to compare

What's Changed

  • [NEW] Implement returning method on SQL Server by @Bugadinho in #220
  • [FIX] Add document to demonstrate how to write nested JOIN. #217
  • [NEW] Add OrderByAsc and OrderByDesc to SelectBuilder/UpdateBuilder/DeleteBuilder/UnionBuilder for better readability. The old methods OrderBy/Asc/Desc are marked as deprecated. #214

New Contributors

Full Changelog: v1.37.0...v1.38.0

Contributors

Bugadinho
Loading

v1.37.0

17 Sep 11:54
@huandu huandu
044cf35
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

  • [NEW] Support clone (deep copy) in all builders (#218)
  • [BUG] Fix union limit syntax error with some flavor (#216) Thanks, @zhangyongding
  • [BUG] Support typed nil in interpolation (#213)

Full Changelog: v1.36.0...v1.37.0

Contributors

deanz-io
Loading

v1.36.0

25 Jul 04:06
@huandu huandu
51f40ba
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

  • Add a fuzz harness for Select by @edznux-dd in #207
  • [bugfix] Nil pointer deref by @edznux-dd in #204
  • feat: implement Returning method for UpdateBuilder and DeleteBuilder in #212

New Contributors

Full Changelog: v1.35.0...v1.36.0

Contributors

edznux-dd
Loading

v1.35.0

20 Mar 11:10
@huandu huandu

Choose a tag to compare

What's Changed

  • NEW: New flavor Doris, which is a dialect of MySQL. See discussion in #192 for details.
  • FIX: the order of LIMIT and OFFSET clauses when using the Presto flavor #195 in #196

New Contributors

Full Changelog: v1.34.0...v1.35.0

Contributors

barweiss
Loading

v1.34.0

11 Feb 08:09
@huandu huandu
87b9c12
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

  • #189: Use args in LIMIT and/or OFFSET expression to optimize query plan caching.
  • #190: Ignore empty values and expressions to prevent syntax error.
  • #191: Support RETURNING in InsertBuilder.
    • See discussion in #83 for details.

Full Changelog: v1.33.0...v1.34.0

Contributors

stavros-k and ErikBooijMB
Loading

v1.33.0: Support `LATERAL` keyword

03 Dec 08:12
@huandu huandu
c4b67f5
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

  • Support LATERAL keyword #181 #183 (Thanks @therve for your ideas)
    • Add a new method LateralAs in SelectBuilder to build LATERAL JOIN expression. Read sample code for LateralAs on GoDoc for details.

Full Changelog: v1.32.0...v1.33.0

Contributors

therve
Loading

v1.32.0: Enhancements and Bug Fixes in SQL Statement Handling and Error Identification

06 Nov 04:59
@huandu huandu
5067ee7
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

  • NEW: Flavor getters by @rodionovv in #177
    • There is a new method Flavor() in Builder to get current flavor set in a builder.
  • NEW: Automatically reference names of CTETables in DELETE and UPDATE statements. #179
    • Based on the discussion in issue #176, the capability previously used with CTETable to automatically include the CTE table name in the FROM clause of SELECT statements has now been extended to UPDATE and DELETE statements.
  • FIX: Avoid stack overflow when Cond is misused. #180
    • Based on the discussion in issue #178, users may call this method to create Cond for building various conditions, which is a misuse, but we cannot completely prevent this error.
    • To facilitate problem identification for users, in the event of misuse of NewCond(), the generated SQL will include the pattern /* INVALID ARG $n */, where n is the sequence number of the problematic variable, allowing users to quickly pinpoint the issue.

Full Changelog: v1.31.0...v1.32.0

Contributors

rodionovv
Loading
Previous 1 3 4
Previous

AltStyle によって変換されたページ (->オリジナル) /