Skip to content

Releases: go-jet/jet

Release v.2.5.0

21 May 15:31
f0bf2c3
Compare
Choose a tag to compare
  • 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

28 Jun 10:30
fdde2ab
Compare
Choose a tag to compare

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

03 Jun 06:40
Compare
Choose a tag to compare
  • Support for WITH statements and Common Table Expressions(CTE). Sample usage.
  • [postgres] Support for ON CONFLICT clause (sample)
  • [mysql] Support for ON DUPLICATE KEY UDPATE clause (sample)
  • New type-safe SET clause for UPDATE statement (sample)
  • Generated files idempotency (timestamp removed from generated files) (issue)
  • Automatic query logging (sample)

Release v.2.2.0

17 Feb 19:32
eea776a
Compare
Choose a tag to compare
  • 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

18 Oct 08:43
940fc06
Compare
Choose a tag to compare
  • [bug] Incorrect query result mapping into complex destination when UUID is used as primary key(issue).
  • [bug] Query should return error when scanning into struct destination and query result set is empty. Query and QueryContext will now return qrm.ErrNoRows(issue).

Release v.2.1.1

04 Oct 09:35
02fafd8
Compare
Choose a tag to compare
  • New aggregate MIN and MAX functions added that accepts any expression type (issue).

Release v.2.1.0

30 Sep 08:22
e3290ce
Compare
Choose a tag to compare
  • 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 as table sqlbuilder types.
    • model types are generated in model folder. To use view model type as grouping destination primary_key tag has to be specified manually. More information here.
  • 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

20 Aug 08:41
fbf3b6d
Compare
Choose a tag to compare

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)
  2. PostgreSQL import part has changed: github.com/go-jet/jet -> github.com/go-jet/jet/postgres
  3. Query execution mapping will also try to convert result set object to destination type if such a conversion is allowed.
  4. For every time type there is now a constructor method that accepts time.Time (DateT, TimeT, TimestampT, TimezT...)
  5. Some methods and types are changed or replaced:
    • 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, ...)

Release v.1.0.0

23 Jul 11:51
05311b8
Compare
Choose a tag to compare
  • 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)
  • 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.