Type safe SQL builder with code generation and automatic query result data mapping
APACHE-2.0 License
Bot releases are hidden (Show)
[Bug] Postgres ON CONFLICT DO NOTHING without conflict target does not appear in generated SQL (pr).
Special thanks to @BillBuilt for spotting the issue.
Published by go-jet 8 months ago
[New] Postgres support for range types.
[New] Postgres support for materialized views.
[New] Sqlite support for generated columns.
[New] Support for OF
in row locking clause.
[New] Postgres support for the FETCH FIRST
clause.
[New] Support for NULLS_FIRST
and NULLS_LAST
sorting order.
[New] Default alias option for table SQL builder.
[New] Faster MySQL code generation for databases with very large numbers of tables.
[New] Postgres support for expression in the OFFSET
clause.
[Bug] Invalid go identifiers ASCII characters are replaced with character description string.
@quirell, @ryym, @josephbuchma, @mattdowdell, @jupp0r, @realbucksavage, @sarkan-ag5
Published by go-jet about 1 year ago
[Bug] QRM doesn't group query result correctly if there are two model slices of the same type in the destination and one slice is aliased (issue, more info)
[Bug] Jet generator fails if MySQL column comment contains an ASCII control character (issue)
[Bug] Jet generator usage string shows the wrong version (issue)
Published by go-jet over 1 year ago
[New] Postgres support for GROUPING SET
, ROLLUP
, CUBE
, and GROUPING
operators (wiki)
[New] MySQL support for WITH ROLLUP
and GROUPING
operators (wiki)
[New] UseSchema
method to replace targeted schema for table and view SQL Builder types (wiki)
[New] Generated columns
are not part of the MutableColumns
list anymore (issue)
[New] MySQL column comments
are now included in generated files (issue)
[Bug] Generator fails if there is an enum with the same name in multiple Postgres schema (issue)
[Bug] QRM fails to group the result if the primary key is a custom type (issue)
[Bug] QRM fails to group the result if there are duplicate slices in the destination (issue)
Published by go-jet about 2 years ago
[New] MySql
insert row alias for duplicate key update statements (issue, wiki)
[New] MySql
statement optimizer hints (issue, wiki)
[New] Postgres
json literal (issue)
[Bug] Some mysql
and sqlite
conditional functions are not exported (issue)
[Bug] Missing SET
method for ColumnTimez
interface (pr)
[Bug] Reserved word RIGHT
missing for postgres
dialect (pr)
Published by go-jet over 2 years ago
[New] CockroachDB
support
[New] Table prefix and suffix for multi-tenant environment (issue)
[New] EXTRACT
time/date support
[Bug] Ignore tables, views and enums does not work if dsn
is present (pr)
[Bug] Statement Query
and Exec
methods can not be used with sql.Conn
(issue)
[Bug] DebugSQL
panics with Valuer
types (issue)
Published by go-jet over 2 years ago
Published by go-jet over 2 years ago
UPDATE
statement FROM
clause support (issue, wiki)DELETE
statement USING
clause support (issue, wiki)WITH RECURSIVE
statement support (wiki)BETWEEN
operator support (wiki)DISTINCT
operator support (issue)DISTINCT ON
clause support (wiki)Published by go-jet almost 3 years ago
Published by go-jet over 3 years ago
Published by go-jet over 4 years ago
Go modules support
For new download procedure take a look at Installation.
Go mod requires for projects with major version 2 or higher, to include major version at the end of the module paths. This means for go.mod projects, depending of go-jet, will have to update there import paths. This can be achieved with the following command:
find . -type f \
-name '*.go' \
-exec sed -i -e 's,github.com/go-jet/jet,github.com/go-jet/jet/v2,g' {} \;
For GOPATH projects import path remains the same.
Published by go-jet over 4 years ago
postgres
] Support for ON CONFLICT
clause (sample)mysql
] Support for ON DUPLICATE KEY UDPATE
clause (sample)SET
clause for UPDATE
statement (sample)Published by go-jet over 4 years ago
Published by go-jet almost 5 years ago
Published by go-jet about 5 years ago
Published by go-jet about 5 years ago
view
sqlbuilder and model types.view
folder and will behave the same as table
sqlbuilder types.model
folder. To use view
model type as grouping destination primary_key
tag has to be specified manually. More information here.ColumnList
is aliased and reverted to be defined as slice of Columns. This will allow conditionally constructing the list of columns, by appending to a slice, before the statements.Published by go-jet about 5 years ago
Changes:
(DISTINCT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET, FOR, UNION, LOCK_IN_SHARE_MODE, sub-queries)
(VALUES, query)
,(SET, WHERE)
,(WHERE, ORDER_BY, LIMIT)
,(READ, WRITE)
github.com/go-jet/jet
-> github.com/go-jet/jet/postgres
time.Time
(DateT, TimeT, TimestampT, TimezT...
)Sql()
and DebuSql
does not return error as a last parameter. If there is an error in statement this methods will panic.RAW
-> Raw
SIMILAR_TO
-> REGEXP_LIKE
NOT_SIMILAR_TO
-> NOT_REGEXP_LIKE
ColumnList{column1, ...}
-> ColumnList(column1, ...)
Published by go-jet about 5 years ago