All Versions
8
Latest Version
Avg Release Cycle
49 days
Latest Release
323 days ago

Changelog History

  • v2.4.0 Changes

    June 28, 2020

    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.

  • v2.3.0 Changes

    June 03, 2020
    • ๐Ÿ‘Œ 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)
  • 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
    • [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).
  • 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 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{......}
  • 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)
      1. PostgreSQL import part has changed: github.com/go-jet/jet -> github.com/go-jet/jet/postgres
      2. Query execution mapping will also try to convert result set object to destination type if such a conversion is allowed.
      3. For every time type there is now a constructor method that accepts time.Time (DateT, TimeT, TimestampT, TimezT...)
      4. 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, ...)
  • 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)
    • 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.