v0.10.0
Dear community,
We're very happy to announce the release of the next version of Ent: v0.10. It has been almost six months since v0.9.1, so naturally, there's a ton of new stuff in this release. Please, read more about it in the Ent blog.
What's Changed
- dialect/sql/sqlgraph: avoid creating tx blocks for single statement create operation by @a8m in https://github.com/ent/ent/pull/1858
- go: upgrade to 1.17 by @a8m in https://github.com/ent/ent/pull/1859
- Goodbye bindata by @a8m in https://github.com/ent/ent/pull/1860
- fix: error message for the missing fk constraints by @dakimura in https://github.com/ent/ent/pull/1861
- added MaxLen built-in validator to
[]byteby @hedwigz in https://github.com/ent/ent/pull/1863 - Bytes min len by @hedwigz in https://github.com/ent/ent/pull/1867
- Added
NotEmpty()to[]byteby @hedwigz in https://github.com/ent/ent/pull/1869 - entc/integration: add example for embedding ent.T in Scan by @a8m in https://github.com/ent/ent/pull/1870
- website/blog: fix gofmt in entviz blog by @a8m in https://github.com/ent/ent/pull/1877
- schema/field: Fix annotations doc example by @msal4 in https://github.com/ent/ent/pull/1878
- schema/field: add codegen header for template by @a8m in https://github.com/ent/ent/pull/1879
- dialect/sql/sqlgraph: avoid creating tx blocks for single DELETE statements by @a8m in https://github.com/ent/ent/pull/1881
- md/fields:enum-types-typo by @yonidavidson in https://github.com/ent/ent/pull/1887
- entc/integ: test adding filters to UpdateOne from mutation by @a8m in https://github.com/ent/ent/pull/1889
- refactor(entc/integration): change
SavetoExecin create operation by @RiskyFeryansyahP in https://github.com/ent/ent/pull/1891 - refactor(entc/integration): change Save to Exec in create operation by @RiskyFeryansyahP in https://github.com/ent/ent/pull/1896
- website/blog: ent joins the linux foundation by @a8m in https://github.com/ent/ent/pull/1897
- all: replace save with exec when the model is not needed by @a8m in https://github.com/ent/ent/pull/1901
- entc/integration: fix gremlin server version by @seiichi1101 in https://github.com/ent/ent/pull/1808
- Custom predicate example for LIKE operator by @sadmansakib in https://github.com/ent/ent/pull/1911
- all: add (*testing.B).ReportAllocs() to all benchmarks by @odeke-em in https://github.com/ent/ent/pull/1919
- entc/gen: add schema type to generated validation errors by @a8m in https://github.com/ent/ent/pull/1924
- website: add link to ent discord server by @a8m in https://github.com/ent/ent/pull/1930
- dialect/sql/sqlgraph: avoid creating tx blocks for single UPDATE statements by @a8m in https://github.com/ent/ent/pull/1937
- Link to non-foreign-key join-table fields GH issue by @bbkane in https://github.com/ent/ent/pull/1912
- dialect/sql/schema: revert #1547 for mariadb by @a8m in https://github.com/ent/ent/pull/1946
- entc/gen: fix fk handling for bytes by @tarrencev in https://github.com/ent/ent/pull/1947
- dialect/sql: use raw 0 in COALESCE function on Add calls by @a8m in https://github.com/ent/ent/pull/1954
- dialect/sql: add Add method to UpdateSet by @a8m in https://github.com/ent/ent/pull/1955
- entc/gen: support de/incrementing values on upsert by @a8m in https://github.com/ent/ent/pull/1956
- dialect/sql/schema: skip parsing expression default for postgres by @a8m in https://github.com/ent/ent/pull/1967
- Unique Field Selection - Merge #1959 by @a8m in https://github.com/ent/ent/pull/1968
- entc/gen: allow distinct in sqlQuery to enable distinct work in Select() by @EndlessIdea in https://github.com/ent/ent/pull/1959
- feat(dialect): support mediumtext by @storyicon in https://github.com/ent/ent/pull/1972
- entc/integ: move docker-compose to top directory by @a8m in https://github.com/ent/ent/pull/1975
- entc/gen: allow spaces in enum fields by @a8m in https://github.com/ent/ent/pull/1977
- entc/gen: fix bug with enum separators by @a8m in https://github.com/ent/ent/pull/1978
- Add Sensitive() option to bytesBuilder by @evanlurvey in https://github.com/ent/ent/pull/1982
- Update tutorial-grpc-setting-up.md by @attackordie in https://github.com/ent/ent/pull/1984
- dialect/sql/sqlgraph: support sql.Scanner types when scanning IDs by @a8m in https://github.com/ent/ent/pull/1987
- entc/integration: add example for bytes id with custom comparable Go types by @a8m in https://github.com/ent/ent/pull/1998
- dialect: fix godoc for Driver by @a8m in https://github.com/ent/ent/pull/2002
- dialect/sql/schema: make Field.Unique and Index.Unique equal by @a8m in https://github.com/ent/ent/pull/2004
- entc/integration: add postgres14 for integration/ci tests by @a8m in https://github.com/ent/ent/pull/2006
- postgres dialect should support other data type like tstzrange and interval by @ThinkontrolSY in https://github.com/ent/ent/pull/2013
- Remove deprecated linter by @sashamelentyev in https://github.com/ent/ent/pull/2017
- all: fix linting issues before migrating to golangci v1.42 by @a8m in https://github.com/ent/ent/pull/2019
- Bump golangci-lint version by @sashamelentyev in https://github.com/ent/ent/pull/2018
- entc/gen: ignore immutable fields on Upsert.UpdateNewValues by @a8m in https://github.com/ent/ent/pull/2011
- fix govet by @sivchari in https://github.com/ent/ent/pull/2021
- entc/gen: fix example code in comment by @mookjp in https://github.com/ent/ent/pull/2025
- https://github.com/ent/ent/pull/2026
- Update 2021-10-11-generating-ent-schemas-from-existing-sql-databases.md by @rotemtam in https://github.com/ent/ent/pull/2029
- entc/integ: add example for o2o with edge field by @a8m in https://github.com/ent/ent/pull/2030
- dialect/sql: wrap the sql.Rows with ColumnScanner interface by @a8m in https://github.com/ent/ent/pull/2001
- website/blog: introducing entcache post by @a8m in https://github.com/ent/ent/pull/2034
- website/blog: minor fix to the entcache post by @a8m in https://github.com/ent/ent/pull/2035
- entc/gen: support count with field selection by @a8m in https://github.com/ent/ent/pull/2037
- blog/entviz: add import on entc.go snippet by @hedwigz in https://github.com/ent/ent/pull/2040
- entc/gen/integ: add example for using query modifiers in multischema mode by @a8m in https://github.com/ent/ent/pull/2041
- add read-write separation example by @lenuse in https://github.com/ent/ent/pull/2032
- Add link to ent/bug by @hilakashai in https://github.com/ent/ent/pull/2045
- Fix typo by @hilakashai in https://github.com/ent/ent/pull/2047
- ent/blog: sqlcomment blog post by @hedwigz in https://github.com/ent/ent/pull/2043
- dialect/sql: add example to SIMILAR TO predicate by @a8m in https://github.com/ent/ent/pull/2055
- add popular extensions by @hilakashai in https://github.com/ent/ent/pull/2054
- schema/field: support default values for json and other by @a8m in https://github.com/ent/ent/pull/2056
- dialect/sql: escape special characters in pattern matching by @a8m in https://github.com/ent/ent/pull/2062
- dialect/sql/sqlgraph: use selector's column instead of table's column by @timoha in https://github.com/ent/ent/pull/2060
- entc/gen: introduce the entc.Dependency option by @a8m in https://github.com/ent/ent/pull/2066
- Update tutorial-todo-gql-mutation-input.md by @freb in https://github.com/ent/ent/pull/2063
- Remove unused named return by @sashamelentyev in https://github.com/ent/ent/pull/2069
- Fix typo in tutorial-grpc-generating-proto.md by @heliumbrain in https://github.com/ent/ent/pull/2082
- entc/gen: support merging dep annotations by @a8m in https://github.com/ent/ent/pull/2081
- entc/gen: fix module version extraction when running entc as a package by @a8m in https://github.com/ent/ent/pull/2086
- website/blog: sync objects in external databases by @a8m in https://github.com/ent/ent/pull/2099
- website/blog: minor typo change by @a8m in https://github.com/ent/ent/pull/2100
- dialect/sqltest: ensure predicates can be reused by @a8m in https://github.com/ent/ent/pull/2101
- dialect/sqltest: use postgres dialect in predicate tests by @a8m in https://github.com/ent/ent/pull/2104
- entc/gen/mutation: add IDs method for mutations by @a8m in https://github.com/ent/ent/pull/2105
- dialect/sql/sqlgraph: minor refactor changes by @a8m in https://github.com/ent/ent/pull/2114
- dialect/sql/schema: support mediumtext field in migration by @a8m in https://github.com/ent/ent/pull/2115
- entc/gen: allow scanning nil valuescanner types directly from database by @a8m in https://github.com/ent/ent/pull/2117
- entc/gen: minor codegen improvements by @a8m in https://github.com/ent/ent/pull/2119
- dialect/sql/sqljson: support comparing values with null literals by @a8m in https://github.com/ent/ent/pull/2125
- dialect/sql/sqljson: fix sqlite haskey and add docs by @a8m in https://github.com/ent/ent/pull/2128
- dialect/sql: use identifier qualifiers for WHERE clause on upsert by @a8m in https://github.com/ent/ent/pull/2131
- Update gRPC Documentation for Service Method Generation Options by @JeremyV2014 in https://github.com/ent/ent/pull/2134
- Getoutreach grevych/sqljson pattern matching predicates by @a8m in https://github.com/ent/ent/pull/2137
- dialect/sql: add pattern matching predicates for json values by @grevych in https://github.com/ent/ent/pull/1794
- entc/integration: minor changes for test cases by @a8m in https://github.com/ent/ent/pull/2148
- ent/doc: load github buttons from cdnjs by @hedwigz in https://github.com/ent/ent/pull/2151
- Update 2021-09-10-openapi-generator.md by @mattn in https://github.com/ent/ent/pull/2154
- Fix entql generation for ID types of Bytes, etc. by @adayNU in https://github.com/ent/ent/pull/2157
- dialect/sql: calling Update.Add after Update.Set should append expression by @a8m in https://github.com/ent/ent/pull/2168
- entc/gen: add support for subtracting values from unsgined fields by @a8m in https://github.com/ent/ent/pull/2169
- Fix migrating Postgres fields with max character varchar custom type by @naormatania in https://github.com/ent/ent/pull/2162
- update faq.md, add new question by @idc77 in https://github.com/ent/ent/pull/2183
- entc/load: add go module info to schema spec by @a8m in https://github.com/ent/ent/pull/2175
- dialect/sql/schema: fix bug when using multiple table CHECK constraints by @a8m in https://github.com/ent/ent/pull/2188
- entc/gen: import gen.Config documentation by @a8m in https://github.com/ent/ent/pull/2189
- dialect/schema: support float for mysql by @yonidavidson in https://github.com/ent/ent/pull/2191
- entc/gen: don't rely on descriptor when retrieving enum values or nam… by @masseelch in https://github.com/ent/ent/pull/2211
- dialect/sql: add support for SelectExpr by @a8m in https://github.com/ent/ent/pull/2220
- convert column type string to lower case by @m3hm3t in https://github.com/ent/ent/pull/2222
- Default field annotation doesn't change existent column #1758 by @m3hm3t in https://github.com/ent/ent/pull/2199
- go: update golang.org/x/tools to latest by @a8m in https://github.com/ent/ent/pull/2229
- dialect/sql: support passing selectors to basic predicates by @a8m in https://github.com/ent/ent/pull/2237
- Adds blog article for using ent in serverless GraphQL using AWS by @bodokaiser in https://github.com/ent/ent/pull/2206
- fix(entc/gen): there was a typo in Tx interfaces by @masseelch in https://github.com/ent/ent/pull/2251
- refactor(all): fix typo by @sashamelentyev in https://github.com/ent/ent/pull/2243
- dialect/sql/schema: do not sort primary-key columns before diff by @a8m in https://github.com/ent/ent/pull/2254
- Fix ctx in tx begin by @Laconty in https://github.com/ent/ent/pull/2260
- dialect/sql/schema: support
time with time zoneandtime without time zoneby @s-takehana in https://github.com/ent/ent/pull/2257 - entc/integration: rename uuid to optional_uuid to allow nillable setters for array types by @a8m in https://github.com/ent/ent/pull/2264
- Spelling fix in error message by @genevieve in https://github.com/ent/ent/pull/2262
- UUID nillable setter by @cjraa in https://github.com/ent/ent/pull/2266
- dialect/sql/sqlgraph: avoid creating tx blocks for single statement batch-create operation by @a8m in https://github.com/ent/ent/pull/2272
- dialect/sql/schema: hello ariga.io/atlas by @a8m in https://github.com/ent/ent/pull/2279
New Contributors
- @dakimura made their first contribution in https://github.com/ent/ent/pull/1861
- @RiskyFeryansyahP made their first contribution in https://github.com/ent/ent/pull/1883
- @seiichi1101 made their first contribution in https://github.com/ent/ent/pull/1808
- @odeke-em made their first contribution in https://github.com/ent/ent/pull/1919
- @isoppp made their first contribution in https://github.com/ent/ent/pull/1928
- @s-takehana made their first contribution in https://github.com/ent/ent/pull/1934
- @bbkane made their first contribution in https://github.com/ent/ent/pull/1912
- @EndlessIdea made their first contribution in https://github.com/ent/ent/pull/1959
- @storyicon made their first contribution in https://github.com/ent/ent/pull/1972
- @evanlurvey made their first contribution in https://github.com/ent/ent/pull/1982
- @attackordie made their first contribution in https://github.com/ent/ent/pull/1984
- @posener made their first contribution in https://github.com/ent/ent/pull/2008
- @ThinkontrolSY made their first contribution in https://github.com/ent/ent/pull/2013
- @sashamelentyev made their first contribution in https://github.com/ent/ent/pull/2017
- @sivchari made their first contribution in https://github.com/ent/ent/pull/2021
- @mookjp made their first contribution in https://github.com/ent/ent/pull/2025
- @lenuse made their first contribution in https://github.com/ent/ent/pull/2032
- @hilakashai made their first contribution in https://github.com/ent/ent/pull/2045
- @freb made their first contribution in https://github.com/ent/ent/pull/2063
- @heliumbrain made their first contribution in https://github.com/ent/ent/pull/2082
- @tankbusta made their first contribution in https://github.com/ent/ent/pull/2110
- @JeremyV2014 made their first contribution in https://github.com/ent/ent/pull/2134
- @grevych made their first contribution in https://github.com/ent/ent/pull/1794
- @mattn made their first contribution in https://github.com/ent/ent/pull/2154
- @naormatania made their first contribution in https://github.com/ent/ent/pull/2162
- @idc77 made their first contribution in https://github.com/ent/ent/pull/2183
- @HurSungYun made their first contribution in https://github.com/ent/ent/pull/2186
- @peanut-cc made their first contribution in https://github.com/ent/ent/pull/2200
- @m3hm3t made their first contribution in https://github.com/ent/ent/pull/2222
- @vecpeng made their first contribution in https://github.com/ent/ent/pull/2235
- @bodokaiser made their first contribution in https://github.com/ent/ent/pull/2206
Full Changelog: https://github.com/ent/ent/compare/v0.9.1...0.10.0