Ariel Mashraki
e2df06503d
entc/integration: add postgres14 for integration/ci tests ( #2006 )
2021-10-04 17:34:12 +03:00
Ariel Mashraki
14cba0abb6
dialect/sql/schema: make Field.Unique and Index.Unique equal ( #2004 )
...
This will allow moving from:
field.String(c).Unique()
To:
index.Field(c).Unique()
And vice versa
2021-10-03 16:20:28 +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
Evan Lurvey
300f0b5307
schema/field: add the Sensitive option to field.Bytes ( #1982 )
...
* Add Sensitive() option to bytesBuilder
I have a use case where I want to store bytes but I want to use the sensitive option.
* Added new field test and ran generation
Co-authored-by: Evan Lurvey <elurvey@Evans-Mac-mini.local >
2021-09-25 23:21:55 +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
5262810d8c
entc/integ: move docker-compose to top directory
2021-09-22 17:06:06 +03:00
Ariel Mashraki
4314b3a9e8
entc/gen: add test cases for unique field selection
2021-09-21 20:31:03 +03:00
Ariel Mashraki
ac05c1357e
examples: run codegen for examples
2021-09-21 20:25:08 +03:00
EndlessIdea
bfc0e7c575
go generate
2021-09-18 16:32:33 +08: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
seiichi
5277780598
entc/integration: change gremlin server version to v3.4.11 #1807 ( #1808 )
2021-09-02 09:07:14 +03:00
Risky Feryansyah
65938ccdd3
entc/integration: change Save to Exec in create operation when model is not needed ( #1896 )
...
* refactor(entc/integration): change Save to Exec in create operation
* fix: should not change to exec if we need return of the data
2021-09-01 10:05:30 +03:00
Risky Feryansyah
9fb76ef5c5
entc/integration: change Save to Exec in create operation ( #1891 )
2021-08-31 13:09:08 +03:00
Ariel Mashraki
e545d0db7a
entc/integ: test adding filters to UpdateOne from mutation
2021-08-30 15:21:16 +03:00
Ariel Mashraki
badf981b37
entc/integration: add example for embedding ent.T in Scan
2021-08-24 22:26:59 +03:00
Amit Shani
ac0bd65145
schema/field: add MinLen built-in validator to bytes fields ( #1867 )
...
* added MaxLen built-in validator to `[]byte`
* typo
* move test to type_test.go
* Update doc/md/schema-fields.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* added min len validator to bytes
* fix tests
go generate
* CR
* CR
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2021-08-24 14:07:29 +03:00
Amit Shani
ad792fe79e
schema/field: add MaxLen built-in validator to bytes fields ( #1863 )
...
* added MaxLen built-in validator to `[]byte`
* typo
* move test to type_test.go
* Update doc/md/schema-fields.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2021-08-24 10:23:43 +03:00
Ariel Mashraki
368a8f7a2e
entc/gen: replace bindata with package embed
2021-08-21 17:13:44 +03:00
Ariel Mashraki
41e2d0c9b5
entc/load: 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
7e3785f105
entc/integ: add generated-id upsert example
2021-08-12 21:01:05 +03:00
Ariel Mashraki
e71ccc6b6e
dialect/sql/sqlgraph: fix bug in entql predicate evaluation ( #1827 )
2021-08-11 21:03:52 +03:00
Ariel Mashraki
eb87d64980
all: remove pkg/errors
2021-08-05 17:37:34 +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
Tarrence van As
09fd9957c0
entc/integration: use exec when not interested in entity return value ( #1775 )
2021-07-27 22:32:27 +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
Ariel Mashraki
279d6c2a12
dialect/sql/sqlgraph: add support for query modifiers
2021-07-20 13:14:39 +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
Zeev Manilovich
e46b18f078
entc/load: removing unneeded var from template ( #1737 )
2021-07-19 12:03:03 +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
4eefbb6af9
schema/field: support validator for Bytes fields
...
Fixed #1714
2021-07-13 21:42:50 +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