NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules, #1128 by repository stars
Latest stable
v1.44.1
Last release 27 days ago
23 Oct 2026
Ships fairly regularly
a new release about every 5 weeks
Most releases are documented
notes for 43 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
127 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
## What's Changed * #118, #126: Support new flavor oracle. Thanks for your contribution, @zhangyongding. * #125: Add new alias functions in Cond for b
oracle. Thanks for your contribution, @zhangyongding.Cond for better readability.Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.22.0...v1.23.0
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
## What's Changed * #108: Support tuple now. See Tuple sample to understand how to use it. * #115: All builders follow a new rule - don't generate a S
NewSelectBuilder().SQL("SELECT foo FROM bar").Where(/*...*/).Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.21.0...v1.22.0
Nothing published for this version
## What's Changed * #98: Add new flavor Presto. * #100: Add EXISTS/NOT EXISTS/ANY/SOME/ALL in Cond. Full Changelog: https://github.com/huandu/go-sqlbu
Cond.Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.20.0...v1.21.0
Nothing published for this version
One more thing. All *ForTag methods in Struct are deprecated. It's highly recommended to use st.WithTag("tag").Select("table") to replace st.SelectFor…
When we build an UPDATE or INSERT SQL with Struct, we may need to filter out struct fields representing primary key or those should not be updated. Before v1.20.0, we have to define several combinations of fieldtag tag for every UPDATE or INSERT. It's not convenient.
To address this issue, there is a new method WithoutTag in Struct to explicitly exclude fields tagged with tags, so that we can simply tag fields as "pk" and call st.WithoutTag("pk").Update("table") to filter them out. And WithTag is upgraded to accept more than one tag. With WithTag and WithoutTag, we can build a complex struct field filter for all kinds of requirement.
To learn how to use these method, checkout document and samples in Struct, Struct.WithTag and Struct.WithoutTag.
One more thing. All *ForTag methods in Struct are deprecated. It's highly recommended to use st.WithTag("tag").Select("table") to replace st.SelectForTag("table", "tag").
Special thanks to @wangmir for your great thoughts and code review feedback.
Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.19.0...v1.20.0
We add a new flavor CQL in this package. See #85 for details. Thanks for your contribution, @SpencerC.
We add a new flavor CQL in this package. See #85 for details. Thanks for your contribution, @SpencerC.
Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.18.0...v1.19.0
Nothing published for this version
We add a new flavor ClickHouse in this package. See #92 for details. Thanks for your contribution, @hanyuancheung.
We add a new flavor ClickHouse in this package. See #92 for details. Thanks for your contribution, @hanyuancheung.
Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.17.0...v1.18.0
Struct and interpolate methods are aware of driver.Valuer type now. Thank @Sora233 to raise this issue.
Struct and interpolate methods are aware of driver.Valuer type now. Thank @Sora233 to raise this issue.
Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.16.0...v1.17.0
Per #87, add new methods on InsertBuilder and Flavor to build "insert ignore" statement for all supported flavors. Thanks, @zhongr3n.
Per #87, add new methods on InsertBuilder and Flavor to build "insert ignore" statement for all supported flavors. Thanks, @zhongr3n.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Per #78, add a new struct field tag fieldas to set set column alias (AS) used in SELECT. It can be useful to build SELECT statement, in which columns
Per #78, add a new struct field tag fieldas to set set column alias (AS) used in SELECT. It can be useful to build SELECT statement, in which columns has alias names, with Struct.
Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.14.1...v1.15.0
Nothing published for this version
If we call them more than once, they will append columns rather than replace columns. It may be a breaking change. Please let me know if this change b…
SelectBuilder#GroupBy and SelectBuilder#OrderBy works slightly different now. If we call them more than once, they will append columns rather than replace columns. It may be a breaking change. Please let me know if this change breaks any reasonable use case. https://github.com/huandu/go-sqlbuilder/issues/74Struct#Columns, Struct#ColumnsForTag, Struct#Values and Struct#ValuesForTag. They can be useful when working with sqlmock. https://github.com/huandu/go-sqlbuilder/issues/75Full Changelog: https://github.com/huandu/go-sqlbuilder/compare/v1.13.0...v1.14.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Per request in #64, SQL builder can build query for SQL Server now.
Per request in #64, SQL builder can build query for SQL Server now.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Per #59, new APIs around field mapper functions are added.
Per #59, new APIs around field mapper functions are added.
In many production environments, table column names are usually snake_case words, e.g. user_id, while we have to use CamelCase in struct types to make struct fields public and golint happy. It's a bit redundant to use the db tag in every struct field. If there is a certain rule to map field names to table column names, We can use field mapper function to make code simpler.
See field mapper function sample as a demo.
There is a method SQL(sql string) implemented by all statement builders like SelectBuilder. We can use this method to insert any arbitrary SQL fragmen
There is a method SQL(sql string) implemented by all statement builders like SelectBuilder. We can use this method to insert any arbitrary SQL fragment when building a SQL. It's quite useful to build SQL containing non-standard syntax supported by a OLTP or OLAP system.
See README.md for more details.
SQLite flavor is added. Try it and let me know your feedback.
SQLite flavor is added. Try it and let me know your feedback.
Nothing published for this version
Nothing published for this version
The omitempty field option is upgraded to a function which can omit a field for one or more tags.
The omitempty field option is upgraded to a function which can omit a field for one or more tags.
See #50 for details.
Per #47, new methods Union and UnionAll are added to support UNION [ALL | DISTINCT] operators.
Per #47, new methods Union and UnionAll are added to support UNION [ALL | DISTINCT] operators.
Per #40, table name should be added as prefix (like table.col) to column names to avoid column name conflict. It's useful when building a SELECT with
Per #40, table name should be added as prefix (like table.col) to column names to avoid column name conflict. It's useful when building a SELECT with JOIN.
Per #39, add new methods in Struct, including InsertIgnoreInto, ReplaceInto, InsertIgnoreIntoForTag and ReplaceIntoForTag.
Per #39, add new methods in Struct, including InsertIgnoreInto, ReplaceInto, InsertIgnoreIntoForTag and ReplaceIntoForTag.
Nothing published for this version
Nothing published for this version
Per #32, add new method SetMore in UpdateBuilder to add more assignments to UPDATE.
Per #32, add new method SetMore in UpdateBuilder to add more assignments to UPDATE.
Per #33, add new method InsertIgnoreInto in InsertBuilder to support INSERT IGNORE INTO.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
#23 This feature is inspired by the interpolation feature implemented by github.com/go-sql-driver/mysql. It's designed to work with some less function
#23 This feature is inspired by the interpolation feature implemented by github.com/go-sql-driver/mysql. It's designed to work with some less functional drivers to bind params to a SQL on client side rather than server side.
Per #18, add CreateTableBuilder and support REPLACE INTO now.
Per #18, add CreateTableBuilder and support REPLACE INTO now.
Per #19, Args#Compile will print raw $ if $ syntax is wrong.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.