mook
076e1269e8
entc/gen: fix example code in comment ( #2025 )
2021-10-12 10:29:58 +03:00
Ariel Mashraki
9e809635b2
entc/gen: ignore immutable fields on Upsert<T>.UpdateNewValues
...
Also, for some reason, the TimeMixin.UpdateTime was an immutable field,
but this was incorrent, because the codegen just skip generating
update setters to it. Removing the Immutable modifier allows users
to set this field explicitly.
2021-10-08 08:20:05 +03:00
Ariel Mashraki
87e2199309
entc/integration: add example for bytes id with custom comparable Go type
2021-09-29 18:31:01 +03:00
Ariel Mashraki
4306643d16
dialect/sql/sqlgraph: support sql.Scanner types when scanning IDs ( #1987 )
...
Fixed https://github.com/ent/ent/issues/1985
2021-09-27 17:49:57 +03:00
Ariel Mashraki
625e422a08
entc/gen: fix bug with enum separators
...
Fixed https://github.com/ent/ent/issues/1961
2021-09-24 00:03:59 +03:00
Ariel Mashraki
4c2faf2282
entc/gen: allow spaces in enum fields
2021-09-23 23:23:28 +03:00
Ariel Mashraki
ac05c1357e
examples: run codegen for examples
2021-09-21 20:25:08 +03:00
Lining Guan
f42014f019
enable distinct in sqlQuery
2021-09-18 16:01:11 +08:00
Ariel Mashraki
5f31091dcd
entc/gen: support de/incrementing values on upsert
...
Fixed https://github.com/ent/ent/issues/1952 .
2021-09-17 14:25:34 +03:00
Tarrence van As
f903c3a371
entc/gen: fix fk handling for bytes ( #1947 )
2021-09-14 22:42:48 +03:00
Ariel Mashraki
c1fae17b6c
entc/gen: add schema type to generated validation errors
2021-09-07 18:33:32 +03:00
Emmanuel T Odeke
9904bcb8c8
all: add (*testing.B).ReportAllocs() to all benchmarks ( #1919 )
...
This allows a full picture when continuous benchmarking
is added to this repository and when any changes are made
to the code in here.
Fixes #1918
2021-09-07 17:04:07 +03:00
Ariel Mashraki
368a8f7a2e
entc/gen: replace bindata with package embed
2021-08-21 17:13:44 +03:00
Ariel Mashraki
11843ff867
go: upgrade to 1.17
2021-08-21 00:14:22 +03:00
Ariel Mashraki
b8532f87a6
entc/gen: support for upsert with client generated ids
...
Fixed #1826
2021-08-14 17:44:04 +03:00
Ariel Mashraki
09c4306378
entc/gen: add support for upsert/on-conflict feature-flag
2021-08-04 14:01:31 +03:00
Ariel Mashraki
3307dd5323
entc/gen: add the Exec(X) methods for BulkCreate
2021-07-29 17:50:51 +03:00
Ariel Mashraki
60a544bb9d
doc/featureflag: add doc and example to the sql/modifier flag
2021-07-29 11:34:21 +03:00
Ciaran Liedeman
bab709001c
entc/gen: fix panics during initTemplates when Config.Storage is nil ( #1769 )
2021-07-26 21:49:07 +03:00
Ariel Mashraki
8973af9b40
schema/field: add support for setting update default funcs to numeric fields ( #1770 )
...
* schema/field:add UpdateDefault to numeric (#1718 )
* schema/field:fix comment
* schema/field: change interface to self type with DefaultFunc/UpdateDefault
* schema/field: change interface to self type with DefaultFunc/UpdateDefault
* schema/field: change interface to self type with DefaultFunc/UpdateDefault
* schema/field: add support for setting update default funcs to numeric fields
Co-authored-by: godcong <jumbycc@163.com >
2021-07-26 13:17:16 +03:00
Tarrence van As
cdfa3e35bb
entc/gen: add Exec and ExecX to Create builder ( #1753 )
2021-07-23 15:00:47 +03:00
Neel Modi
051f19a997
entc/gen: fix typo in templates ( #1760 )
...
* fix typo
* fix typo
2021-07-22 12:19:39 +03:00
Ariel Mashraki
6a7b3c8e7a
entc/gen: add feature-flag and implementation for sql/lock
...
Fixed #358
2021-07-21 11:50:06 +03:00
Tarrence van As
dfc7a79f6d
schema/field: support unique bytes ( #1720 )
2021-07-20 10:24:38 +03:00
Ariel Mashraki
6ff6e81652
doc/template: add docs for template helpers
2021-07-20 09:57:28 +03:00
Ariel Mashraki
81eeefa6a2
entc/gen: add support for helper templates
...
Closed #1655
2021-07-20 09:57:28 +03:00
Ariel Mashraki
b8129817ca
entc/gen: return an error instead of panic when import forgotten
2021-07-19 11:25:52 +03:00
Ariel Mashraki
88b168ad09
entc/gen: exposing filter/where api on mutations
2021-07-18 18:19:41 +03:00
Ariel Mashraki
430a3ee8b3
entc/gen: add example for uuid edge-field and fix #1723 ( #1731 )
2021-07-16 22:33:28 +03:00
Ariel Mashraki
0b10a44f71
entc/gen: allow scanning zero or more fields on Select
2021-07-12 22:44:50 +03:00
Ariel Mashraki
297067712f
entc/gen: pass referenced columns schema-type to fk columns
...
Fixed #1699
2021-07-09 15:40:52 +03:00
Ariel Mashraki
d3a0b89864
entc/gen: simplify the way to get gen.Field operation
...
External templates should not deal with storage configuration
2021-06-27 11:07:38 +03:00
Ariel Mashraki
ded20a0e36
entc/gen: cleanup sql templates
2021-06-27 10:27:10 +03:00
Ariel Mashraki
c40ae45aee
entc/gen: add support for summing custom Go numeric types
2021-06-25 17:30:17 +03:00
Ariel Mashraki
7869e83a10
entc/integ: add test case for #1654
2021-06-24 12:01:51 +03:00
Ivan Vanderbyl
4ba56ea901
entc/gen: delete removal edges from mutation ( #1654 )
...
* Remove Edge IDs from internal Mutation state
* Update template gen
* Update integration tests
* Update examples
2021-06-24 11:26:22 +03:00
Ariel Mashraki
37de2bd3f6
entc/gen: add support for user-defined ids in gremlin ( #1651 )
2021-06-22 23:26:32 +03:00
Ariel Mashraki
42a2c67cc4
dialect/entsql: add support for table checks in schema/migration
2021-06-17 23:22:37 +03:00
Ariel Mashraki
754b56856a
entc/gen: disallow immutable edge-fields
...
Until we add the immutable option for edges
2021-06-16 22:19:53 +03:00
Ariel Mashraki
66871c9806
dialect/sql/schema: add support for index prefixes in mysql
2021-06-09 22:52:31 +03:00
Matthew Gabeler-Lee
110073c982
entc/gen: fix nil dereference (SIGSEGV) on db errors during Save with Hooks ( #1629 )
...
* entc/gen: check for errors before assuming success when save has hooks
* entc/integration,examples: update generated code
2021-06-09 08:56:11 +03:00
Ariel Mashraki
f5c284787f
dialect/sql: allow appending select columns to query
2021-06-01 11:50:16 +03:00
Ariel Mashraki
11567a3926
entc/gen: update mutation-id on post mutation
2021-05-31 20:31:51 +03:00
Ciaran Liedeman
844f63015d
entc/gen: remove internal rollback function from templates ( #1602 )
2021-05-26 20:17:12 +03:00
Andy Day
237799dd2e
schema/field: allow non-string ValueScanner types for enum fields ( #1577 )
...
* Make non-string ValueScanner types work with enum fields
This change fixes #1575 which now makes it possible to specify a GoType
for an enum that is not a string alias. It requires that if the specified
type is not a string alias, the type must satisfy the Stringer interface.
* remove default, rename field
* wip
* remove comment
* go generate
* make optional
* generate 🤦
* handle NULL case
* turns out mysql stores strings as []uint8
2021-05-20 23:29:47 +03:00
Ariel Mashraki
6691e6a28c
entc/gen: import custom types in mutation template ( #1576 )
2021-05-19 15:53:47 +03:00
Mahmudul Haque
ba954ebeec
dialect/sql/schema: add field collation support ( #1548 )
...
* specific field collation support
* go generate ./...
2021-05-09 18:09:08 +03:00
AlonDavidBehr
fb06930a62
entc/gen/template: fixed validation spelling ( #1531 )
2021-05-03 17:44:07 +03:00
Vojtěch Káně
43ef74b8a8
entc/gen: add support for default annotation to PKs as well ( #1492 )
2021-04-22 14:16:53 +03:00
Ariel Mashraki
91dda6230f
entc/gen: allow simple types to implement valuescanner
2021-04-20 14:44:31 +03:00