Ariel Mashraki
e5bceccf1d
entc/integration: add query modifier example
2021-06-01 17:00:40 +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
Ariel Mashraki
5eb5f501f0
entc/integration: add test case to check nillable values
2021-05-28 21:23:04 +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
Benjamin Bourgeais
56d8c77e5c
schema/index: add support for annotations ( #1562 )
...
* index: Add support for annotations
* entc loader: Add support for index annotations
2021-05-18 10:55:53 +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
Ariel Mashraki
0bfaa11e2f
schema/field: support valuescanner types for uuid fields ( #1538 )
...
Fixed #1485
2021-05-07 16:22:46 +03:00
AlonDavidBehr
fb06930a62
entc/gen/template: fixed validation spelling ( #1531 )
2021-05-03 17:44:07 +03:00
Ariel Mashraki
b3c437f936
entc/integration: add example for join table with edge fields
2021-04-29 16:54:10 +03:00
Ariel Mashraki
6b939670f5
entc/load: improve godoc and add pkgpath to errors
2021-04-28 11:11:44 +03:00
Ariel Mashraki
12a62afb24
entc/integration: add example for edgefield indexes
2021-04-27 19:18:08 +03:00
Ariel Mashraki
3a791b8e81
dialect/entsql: add integration tests ( #1494 )
2021-04-22 14:34:37 +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
Ariel Mashraki
497fca4c96
entc/gen: skip selecting group-by fields if they already selected
2021-04-19 17:20:44 +03:00
Ariel Mashraki
2bfb34fe82
doc/md: add example on how to group-by an edge
2021-04-19 14:28:40 +03:00
Ariel Mashraki
a51c50f6a3
entc/gen: allow group-by by relations
2021-04-19 14:28:40 +03:00
Ariel Mashraki
9829ffb385
entc/integ: add example for custom id type
2021-04-17 13:45:51 +03:00
Ariel Mashraki
2480b5c0ef
entc/gen: wrap nillable fields with custom go-type with sql.nullscanner
2021-04-17 13:13:40 +03:00
Ariel Mashraki
fd1f2df150
dialect/sql/schema: add support for pg arrays in migration
2021-04-14 14:25:28 +03:00
Ciaran Liedeman
eff6552989
entc/gen: allow users to alter Query initialization using templates ( #1453 )
...
* Templating: Allow user to alter Query struct init
* Update entc/gen/template/dialect/sql/query.tmpl
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* pr feedback
* renamed template
* changed sql to *
* to tabs
* removed old template
* update bin-data
* Update entc/integration/template/ent/template/query.tmpl
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* restore newline
* update bindata
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2021-04-14 14:04:29 +03:00
Ariel Mashraki
30c947546f
entc: add global annotations option
2021-04-11 13:58:10 +03:00
Ariel Mashraki
8d7bb7fad6
entc/gen: check edge-field on mutation-cleared calls for edges
...
Fixed #1445
2021-04-10 14:56:34 +03:00
Ariel Mashraki
106dd53d23
doc: add goland type annotation to examples and doc
2021-04-09 17:53:04 +03:00
Ariel Mashraki
34aabc0eb1
entc/gen/template: add goland-annotation for template data-types
2021-04-09 17:53:04 +03:00
Ariel Mashraki
9090c103be
entc/gen: add edge method for getting mutation-remove in templates
2021-04-08 15:56:11 +03:00
Ariel Mashraki
2cc1c628dc
schema/field: use actual go type in generated interfaces ( #1428 )
2021-04-07 09:53:44 +03:00
Ariel Mashraki
f3f03e1edd
schema/edge: add support for configuring foreign-key symbols
...
Fixed #1423
2021-04-04 15:27:57 +03:00
Ariel Mashraki
745afde770
dialect/entsql: add support for column default using annotation
...
Fixed #1033
2021-04-03 21:53:56 +03:00
Ariel Mashraki
a1ad70c685
dialect/sql/schema: json column migration for mariadb10.3.13
...
See https://github.com/ent/ent/issues/1395\#issuecomment-809420881
Fixed #1395
2021-03-29 22:34:58 +03:00
Ariel Mashraki
21989f4aa4
entc/gen: chagne column-check error format
2021-03-29 15:29:45 +03:00
Ariel Mashraki
f12ef91829
entc/gen: privatize table columns check
2021-03-29 14:35:38 +03:00
Ariel Mashraki
2d09c8f846
entc/gen/features/multischema: pass schema to count query ( #1390 )
...
Fixed #1385
2021-03-25 13:48:32 +02:00
Ariel Mashraki
56a0cf1e8b
dialect/sql/sqlgraph: fix incorrect arg-list handling in entql
...
Fixed #1376
2021-03-22 20:27:12 +02:00
Ariel Mashraki
cf8464cb28
entc/gen/template: allow disable DISTINCT in queries ( #1371 )
2021-03-22 16:36:05 +02:00
Ariel Mashraki
970887b4d0
entc/gen/template: add extend-templates for all builders ( #1364 )
2021-03-20 21:46:15 +02:00
Ariel Mashraki
693e8db207
entc/integration: set custom uuid identifier unique on database ( #1362 )
2021-03-20 18:33:04 +02:00
Ariel Mashraki
b4ad29f7f3
dialect/sql/schema: fix postgres index migration ( #1351 )
...
Fix PostgreSQL index migration when table_name = type_name.
Closed #1344
2021-03-18 22:29:39 +02:00
Ariel Mashraki
9685066b83
entc/gen: support on-delete annotation in migrate/schema
2021-03-16 15:29:21 +02:00
Ariel Mashraki
e92dfee33f
entc/gen: filter duplicate ids when loading m2m edges
2021-03-16 08:44:27 +02:00
Ariel Mashraki
6ab0d01ea4
entc/gen: filter duplicate ids when loading o2m/m2o edges
2021-03-16 08:44:27 +02:00
Ariel Mashraki
5d70144f44
entc/gen: allow selecting partial fields on update-one
2021-03-14 23:17:30 +02:00
Ariel Mashraki
0cd637ceb2
doc/faq: add examples how to extend the generated builders ( #1335 )
2021-03-14 14:13:02 +02:00
Ariel Mashraki
76ffcc4adc
entc/gen: allow extending config options from global templates ( #1334 )
2021-03-14 12:21:42 +02:00
Rotem Tamir
36e3492718
dialect/sql/sqlgraph: adding unit tests for IsConstraintError ( #1318 )
...
* dialect/sql/sqlgraph: adding unit tests for IsConstraintError group of checks in second phase of #1310
* renaming test for loop variable names
* use backtick strings to improve readability
2021-03-10 18:23:24 +02:00
Rotem Tamir
bc04816c38
entc/gen/template/dialect/sql: cleaning up isSQLConstraintError ( #1319 )
...
* entc/gen/template/dialect/sql: cleaning up isSQLConstraintError in generated ent.go to use new sqlgraph IsConstraintError checks.
Adding IsFK and IsUniqueness methods to the generated ent.ConstraintError (on SQL dialects) struct to allow users to glean more information about the specific constraint violation.
Fixes #1310
* fix indentation in tmpl file
regen files
rm new methods from generated code
* regen
2021-03-10 14:07:00 +02:00
森 優太
e52439c5be
cmd/ent: fix //go:generate code generation to match go1.16 ( #1300 )
...
* doc: fix github link
* doc: fix Link entgo.io -> github.com/ent
* 🎉 first commit
* update go generate style
* doc: update go get to go install
* doc: update versioning with go install
* restore all
* change generate.go content
* add -mod=mod option
* add -mod=mod option
2021-03-09 22:00:33 +02:00