All Versions
8
Latest Version
Avg Release Cycle
49 days
Latest Release
1535 days ago
Changelog History
Changelog History
-
v2.4.0 Changes
June 28, 2020Go 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.
-
v2.3.0 Changes
June 03, 2020- ๐ Support for WITH statements and Common Table Expressions(CTE). Sample usage.
- ๐ [
postgres
] Support forON CONFLICT
clause (sample) - โก๏ธ [
mysql
] Support forON DUPLICATE KEY UDPATE
clause (sample) - ๐ New type-safe
SET
clause forUPDATE
statement (sample) - ๐ Generated files idempotency (timestamp removed from generated files) (issue)
- ๐ฒ Automatic query logging (sample)
-
v2.2.0 Changes
February 17, 2020- ๐ Interval type support. Sample usage can be seen here.
- Datetime arithmetic with interval types (ADD/SUB).
- ๐ Dynamic projection list support. Sample usage.
- [bug] Escape reserved words used as identifiers in generated SQL(issue).
- ๐ [bug] Fix crash on generating enum SQL Builder files when database enum contains numeric values(issue).
-
v2.1.2 Changes
October 18, 2019 -
v2.1.1 Changes
October 04, 2019- ๐ New aggregate MIN and MAX functions added that accepts any expression type (issue).
-
v2.1.0 Changes
September 30, 2019- ๐ Window function support. Sample usage can be seen here.
- ๐ Database views support
- Jet generator now generates
view
sqlbuilder and model types. - sqlBuilder types are generated in
view
folder and will behave the same astable
sqlbuilder types. - model types are generated in
model
folder. To useview
model type as grouping destinationprimary_key
tag has to be specified manually. More information here.
- Jet generator now generates
- Jet internal types are now aliased. This allows passing of manually constructed expression slices as variadic argument of some operators and functions.
- โช [API break]
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.
๐ To fix build, just replace parentheses with braces. ColumnList(.....) -> ColumnList{......}
-
v2.0.0 Changes
August 20, 2019๐ Changes:
๐ 1. MySQL and MariaDB support:
- SELECT
(DISTINCT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET, FOR, UNION, LOCK_IN_SHARE_MODE, sub-queries)
- INSERT
(VALUES, query)
, - UPDATE
(SET, WHERE)
, - DELETE
(WHERE, ORDER_BY, LIMIT)
, - LOCK
(READ, WRITE)
- PostgreSQL import part has changed:
github.com/go-jet/jet
->github.com/go-jet/jet/postgres
- Query execution mapping will also try to convert result set object to destination type if such a conversion is allowed.
- For every time type there is now a constructor method that accepts
time.Time
(DateT, TimeT, TimestampT, TimezT...
) - Some methods and types are changed or replaced:
- PostgreSQL import part has changed:
Sql()
andDebuSql
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, ...)
- SELECT
-
v1.0.0 Changes
July 23, 2019- ๐ Auto-generated type-safe SQL Builder
- Types - boolean, integers(smallint, integer, bigint), floats(real, numeric, decimal, double precision),
strings(text, character, character varying), date, time(z), timestamp(z) and enums. - Statements:
- SELECT (DISTINCT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET, FOR, UNION, INTERSECT, EXCEPT, sub-queries)
- INSERT (VALUES, query, RETURNING),
- UPDATE (SET, WHERE, RETURNING),
- DELETE (WHERE, RETURNING),
- LOCK (IN, NOWAIT)
- Types - boolean, integers(smallint, integer, bigint), floats(real, numeric, decimal, double precision),
- Auto-generated Data Model types - Go types mapped to database type (table or enum), used to store
result of database queries. Can be combined to create desired query result destination. - Query execution with result mapping to arbitrary destination structure.
- ๐ Auto-generated type-safe SQL Builder