Releases: go-jet/jet
Releases · go-jet/jet
Release v.2.5.0
- LATERAL queries support (wiki)
- RawStatement support (wiki)
- Expose statement Rows method (wiki)
- Allow Raw helper to accept named arguments (wiki)
- Lossless decimal types conversion (wiki)
- Implicit CROSS JOIN support (wiki)
- SQL builder schema rename support. (wiki)
- [Bug][MySQL] UPDATE statement does not escape reserved word when MODEL is used (issue)
- Allow Bytea literal constructor to accept byte array as well as string
- New literal constructor functions: (wiki)
- for each of the integer types - Int32(), UInt32(), Int64, UInt64(), etc..
- for uuid literal - UUID()
- for exact decimal literal - Decimal()
Release v.2.4.0
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.
Release v.2.3.0
- 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)
Release v.2.2.0
- 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).
Release v.2.1.2
Release v.2.1.1
- New aggregate MIN and MAX functions added that accepts any expression type (issue).
Release v.2.1.0
- 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{......}
Release v.2.0.0
Changes:
- 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)
- SELECT
- 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:
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, ...)
Release v.1.0.0
- 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.