Skip to content

v0.11.0

Compare
Choose a tag to compare
@a8m a8m released this 13 Jul 14:03
· 425 commits to master since this release
1c01301

We're very happy to announce the release of the next version of Ent: v0.11 🎊

This release contains several bug fixes, many small features, and improvements to the ent/schema, ent runtime, and ent codegen. There are 3 major features that were added to the framework: Edge Schemas, GraphQL Schema Generator and a completely new infrastructure for generating schema migrations using Atlas. Please, visit these links to learn more about these new functionalities.

In the next version, we plan to start experimenting with generics to reduce the amount of generated code and may consider exposing new generics-based extensions. Additional tasks that are on our list are query interceptors, polymorphic edges, a toolset for executing migrations safely, and a list of small runtime improvements that exist in our issue tracker.

You are welcome to join our Discord Server, Slack channel and subscribe to the Ent newsletter to get updates on the new features, proposal discussions, and content we release.

What's Changed

  • dialect/sql/schema: add name to versioned migration files by @imhuytq in #2375
  • schema/field: expose RType.Implements method by @a8m in #2379
  • entc/gen: set Ref and Inverse for edge contains both From and To by @a8m in #2380
  • dialect/sql/schema: add method to create a named versioned migration … by @masseelch in #2385
  • entc/integration: additional schema changes for migration by @a8m in #2403
  • dialect/sql/schema: upgrade atlas and disable sum file creation by @masseelch in #2400
  • dialect/sql: avoid passing bool arguments on bool predicates by @a8m in #2405
  • entc/gen: move column default quoting to template by @a8m in #2406
  • dialect/sql: without foreign keys option for atlas by @zeevmoney in #2404
  • all: drop 1.16 support and run CI on 1.17 and 1.18 by @masseelch in #2411
  • entc/gen: move select and group builders' scan functions to shared struct by @a8m in #2412
  • Update schema-def to use proper method by @fgm in #2416
  • Update getting-started.md by @fgm in #2414
  • entc/gen: use join for loading m2m relationship by @a8m in #2417
  • entc/integration/custom_id: update atlas and fix issue in integration tests by @a8m in #2424
  • dialect/sql/schema: skip creating unique key for primary keys by @a8m in #2425
  • dialect/sql: add support for window functions by @a8m in #2431
  • dialect/sql/schema: prefix sqlite unique indexes with table name by @a8m in #2433
  • entc/gen: allow adding extra fields to the generated edges by @a8m in #2437
  • update example import by @cjraa in #2432
  • Fix incorrect Go code in GoType() doc comments by @fgm in #2441
  • dialect/sql: support for order by expressions in window functions by @a8m in #2442
  • entc/gen: block Optional on the ID field by @giautm in #2443
  • gen/entc/template: add option to process nodes after query using external templates by @a8m in #2444
  • dialect/sql/schema: init db version before executing diff by @CharlesGe129 in #2440
  • entc/gen: add the sql/execquery feature flag by @a8m in #2447
  • entc/integration/migrate: update atlas and test custom time precision by @a8m in #2462
  • dialect/sql/schema: option to enable atlas sum file by @masseelch in #2470
  • entc/gen: expose config on generated filters by @a8m in #2473
  • entc/gen: skip Table() predicate and warn about reserved schema name (Client) by @masseelch in #2486
  • entc/integration/migrate: add example for renaming columns by @a8m in #2496
  • entc/integration/json: add example for using interfaces in JSON fields by @a8m in #2497
  • gen/template: allow overriding of client struct and initialization by @masseelch in #2503
  • dialect/sql: add New method to pass in a river without opening a *sql… by @masseelch in #2504
  • dialect/sql: support string based pk for mysql56 indexes (prevent err… by @masseelch in #2506
  • entc/gen/template/sql/feature: add comment to feature field on config… by @masseelch in #2515
  • Fix propagating post-save mutations by @booleangate in #2525
  • dialect/sql/schema: respect sumfile when present and do not operate on checksum mismatch by @masseelch in #2522
  • Sub queries by @crossworth in #2509
  • entc/gen: add conditional-write option to external templates by @a8m in #2542
  • go: update ariga.io/atlas to latest master by @a8m in #2555
  • feat: add Nil/NotNil predicates by @giautm in #2556
  • ent: initial support for edge schemas by @a8m in #2560
  • go: update ariga.io/atlas to latest master by @a8m in #2567
  • update sqlite3 driver from 1.14.10 to 1.14.13 by @stoikheia in #2566
  • entc/gen: avoid setting the incremental attribute fo non-integer fields by @a8m in #2571
  • dialect/sql: fixed wrong UserDefined checks by @giautm in #2572
  • dialect/sql/sqlgraph: better support for update nodes with predicates by @a8m in #2574
  • entc/gen: support indexing edge schema with composite primary keys by @a8m in #2578
  • ci: bump golangci-lint version by @sashamelentyev in #2577
  • Do not refer to SQLite3 anymore by @frederikhors in #2593
  • entc/gen: move a8m/entclean logic to ent by @a8m in #2612
  • refactor: rename annotation vars by @sashamelentyev in #2614
  • Use fmt.Errorf instead of errors.Wrapf by @frederikhors in #2608
  • entc/gen: change codegen signature from entc to ent by @a8m in #2627
  • Fix compile error caused by entc template when Entity name has initials TX by @hax10 in #2633
  • dialect/sql/schema: introduce type store interface by @masseelch in #2636
  • feat: improve generated comments by @willbicks in #2632
  • entc/gen: fixed unnamed field initialization by @giautm in #2648
  • dialect/sql/schema: file based type store by @masseelch in #2644
  • go: update atlas and test for global-unique-id migration by @a8m in #2661
  • entc/gen: catch constraint failures in delete operations by @a8m in #2664
  • entc/gen: allow opening and testing concurrent enttest clients by @a8m in #2665
  • ci: remove unnecessary build flag from go test by @a8m in #2672
  • entc/gen: use gotype pkgname as alias in case it does not match pkgpath by @a8m in #2686
  • Update comment typo in group.go by @seawolf in #2687
  • entc/gen: support default id values for edge schemas by @a8m in #2688
  • Add info about using WhereInput in with .Where() by @frederikhors in #2691
  • schema/field: support for sensitive json fields by @a8m in #2701
  • dialect/sql/schema: setup tables before running migrate diff by @a8m in #2703
  • improve multi-tenancy example and documentation by @a8m in #2705
  • entc/gen: skip nodes with composite id types on default id-type detection by @a8m in #2708
  • entc: cleanup defaults ID by @giautm in #2709
  • dialect/sql/sqlgraph: support edge-schema in upsert by @a8m in #2714
  • Fix problem when model maps integer id to a GoType by @stoikheia in #2657
  • dialect/sql/schema: atlas engine is now default by @masseelch in #2698
  • dialect/sql/sqlgraph: handle edge schema in batch inserts by @a8m in #2718
  • entc/gen: ignore edge-fields order in edge-schema with composite identifiers by @a8m in #2719
  • entc/gen: improve edge-schema updates by @a8m in #2726
  • all: update atlas by @masseelch in #2739
  • dialect/sql/builder: make sql.In() with empty args fallback to False() by @Liooo in #2735
  • entc/gen: edge schema with custom ids by @a8m in #2742
  • entc/gen: support edgeschema with privacy by @a8m in #2745
  • sql/dialect/schema: support setting PK to serial types in postgres by @a8m in #2748

New Contributors

Full Changelog: v0.10.1...v0.11