Ariel Mashraki
dc8ea50747
entc/gen: add support for MapBulkCreate ( #3696 )
2023-08-16 11:46:14 +03:00
Ariel Mashraki
633d021f48
entc/gen: avoid conflict between package and receiver names ( #3563 )
2023-05-25 14:45:57 +03:00
Ariel Mashraki
3f1063c77e
schema/field: add support or external ValueScanner ( #3391 )
2023-03-16 22:18:54 +02:00
Ariel Mashraki
acc4c5aac6
entc/gen: remove todo from template ( #3385 )
2023-03-13 18:57:12 +02:00
Ariel Mashraki
037b5a4bc3
dialect/sql/sqlgraph: add builders to create spec ( #3288 )
2023-01-31 09:37:51 +02:00
Ariel Mashraki
34bd0b7b6f
entc/gen: move mutation hooks logic to a shared generic function ( #3180 )
2022-12-19 17:36:29 +02:00
Ariel Mashraki
a8dde5e0d1
dialect/sql/sqlgraph: move fields setters to method calls ( #2995 )
2022-10-08 20:08:22 +03:00
Reiji Tokuda
91b643091f
entc/gen: support setting GoType for integer IDs ( #2657 )
...
* Fix problem when model maps integer id to a GoType
* Update generated files
* apply suggestions from code review
* Update generated files
* Update generated files after merge from master
* Cleanup test code in integration
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Modify integration test IntSID.
Wrapped tests of IntSID for avoid conflicts.
* Modify tests in integrations
Order of tests was changed. As a result, if-statement for difference in RDB is deleted.
+ force pushing same commit to invoke ci.
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-07-04 08:50:51 +03:00
Giau. Tran Minh
195be2d98d
entc/gen: fixed unnamed field initialization ( #2648 )
...
* entc/gen: fixed ConstraintError fields name
* fix: run go generate
* entc/gen: fixed Filter fields name
* fix: run go generate again for entql
2022-06-14 12:32:46 +03:00
Giau. Tran Minh
0917701f91
entc/gen: fix wrong UserDefined checks in templates ( #2572 )
2022-05-28 12:12:57 +03:00
Ariel Mashraki
e1c5277483
ent: initial support for edge schemas ( #2560 )
2022-05-25 15:46:00 +03:00
Pedro Henrique
f45d29ba4b
entc/gen: allow if field to use field.Other with custom types ( #2309 )
...
* fix ID with field.Other comparing with zero
* fix lint
* Update entc/integration/customid/ent/schema/other.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* re-generate code
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-02-10 16:17:16 +02:00
Ariel Mashraki
e915765f3b
entc/gen: allow scanning nil valuescanner types directly from database
...
Fixed https://github.com/ent/ent/issues/2116
2021-11-07 23:09:02 +02: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
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
Tarrence van As
dfc7a79f6d
schema/field: support unique bytes ( #1720 )
2021-07-20 10:24:38 +03:00
Ariel Mashraki
ded20a0e36
entc/gen: cleanup sql templates
2021-06-27 10:27:10 +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
11567a3926
entc/gen: update mutation-id on post mutation
2021-05-31 20:31:51 +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
2cc1c628dc
schema/field: use actual go type in generated interfaces ( #1428 )
2021-04-07 09:53:44 +03:00
Ariel Mashraki
c0fd7c1305
entc/gen: add edge-field api for schema and codegen ( #1213 )
2021-03-07 22:51:17 +02:00
Ariel Mashraki
63eb68a269
entc/gen/template: allow mutating the sqlgraph.CreateSpec by ent extensions or user templates
2021-01-19 09:51:38 +02:00
Nathaniel Peiffer
b8b82f80a4
entc/gen: fix grammar and language usage in function comments ( #1126 )
...
* fix grammar and english usage in templates
* bindata gen
* codegen
* go generate ./again...
2021-01-04 14:34:40 +02:00
Ariel Mashraki
17abe2d60f
entc/gen: less sophisticated naming logic ( #774 )
...
Closed #772
2020-09-17 09:19:55 +03:00
Ariel Mashraki
b4b4fa95d7
entc/gen: restructure hooks execution ( #741 )
...
Closed #739
2020-09-09 10:41:17 +03:00
Ariel Mashraki
e71a6de39b
entc/gen: fix hooks invocation on bulk-create ( #649 )
2020-07-29 18:35:21 +03:00
Ariel Mashraki
f677112e18
entc/gen: ignore query execution on empty batch ( #648 )
2020-07-29 18:07:14 +03:00
Ariel Mashraki
875e6e516b
entc/gen: initial implementation for create-bulk #613
...
Closed #236
2020-07-24 20:16:31 +03:00
Ariel Mashraki
399883a71a
entc/gen/sql: move spec creation to a function ( #604 )
...
To be shared with batch-create builder
2020-07-13 13:27:36 +03:00
Ariel Mashraki
65f96b3593
entc/gen: remove legacy i2a support for ids ( #389 )
...
* entc/gen: remove legacy i2a support for ids
* integ: add customid tests for fk strings
2020-03-16 18:19:30 +02:00
Ariel Mashraki
7988d3084d
entc/hooks: initial work for mutations and hooks ( #377 )
...
* entc/hooks: initial work for mutations and hooks
* ent/schema: adding policy to schema
* ent: change op string to uint
* entc: move entschema to runtime and enable smooth transition
* entc/privacy: adding privacy template
* all: goimports
* intg/hooks: mutation client/tx and basic schema tests
* ent/privacy: adding more verbose decisions
* entc/gen: edge-ids getter and additional tests
* all: regen assets
* entc/gen: fix client hookd propagation
* intg: add deletion example
* intg/privacy: remove old entschema package
* typed privacy
* ent/privacy: hooks shouldn't be called on privacy deny
* entc/gen: fix schema hooks invocation order
* remove read policy from public api
* update circleci go orb
Co-authored-by: Ariel Mashraki <ariel@mashraki.co.il >
2020-03-16 00:19:27 +02:00
Ariel Mashraki
9b2b53f559
entc/gen: avoid conflict local vars with user packages ( #292 )
...
Fixes #284
2020-01-16 17:30:18 +02:00
Ariel Mashraki
1c54439d40
entc/gen: move scan-assign to node def
2019-12-22 17:15:33 +02:00
Ariel Mashraki
7fde9b7642
entc/gen: move sql-update-one to sqlgraph
2019-12-22 13:32:51 +02:00
Ariel Mashraki
c6800a3869
entc/gen: move node creation to sqlgraph
2019-12-17 22:45:04 +02:00
Ariel Mashraki
67c3fd2db9
entc/gen: initial work for supporting uuid fields in codegen
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/182
Reviewed By: alexsn
Differential Revision: D18638199
fbshipit-source-id: 0de79c78b51e544486c07a004c3c8ea82e5c3398
2019-11-24 07:11:23 -08:00
Ariel Mashraki
2b2e056f05
entc/gen/sql: support custom-id on create
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/166
Reviewed By: alexsn
Differential Revision: D18514295
fbshipit-source-id: e5988552c5611cbad18476ab2d9c2155df1e6e0c
2019-11-14 14:38:58 -08:00
Ariel Mashraki
c259aee24b
entc/gen: generate sql builders with dialect option
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/130
Reviewed By: alexsn
Differential Revision: D18164397
fbshipit-source-id: 2858d69d3ff85c06b51382c01c3d4369ee2c3bdb
2019-10-27 21:53:50 -07:00
Ariel Mashraki
36a3971f3d
entc/gen: add struct field name to fields and edges
...
Summary: avoig logic in templates
Reviewed By: alexsn
Differential Revision: D17926168
fbshipit-source-id: d583e800fb4a45cf939e9788cea6d45e126c61fe
2019-10-15 06:42:44 -07:00
Ariel Mashraki
64ed7580c0
entc/gen: use BuilderField for builder memebrs
...
Summary: StructField should be used a member of the ent type (struct), and logic should be removed from templates.
Reviewed By: alexsn
Differential Revision: D17926151
fbshipit-source-id: f77c5ce8359816ec3a4ce1ab71dd98f205706deb
2019-10-15 06:42:44 -07:00
Ariel Mashraki
6f5f42ab3c
dialect/sql: dialect based builders ( #1550 )
...
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1550
Pull Request resolved: https://github.com/facebookincubator/ent/pull/84
This is still WIP and you should ignore this.
Reviewed By: alexsn
Differential Revision: D17854477
fbshipit-source-id: 2d19713c118adb31164b7a2781327e64c87db8d4
2019-10-13 07:03:11 -07:00
Ariel Mashraki
0f71ca6ad8
entc/cmd/entc: support more numeric types for ids
...
Reviewed By: alexsn
Differential Revision: D17527952
fbshipit-source-id: 1465b054531cee8ca1dd445b6654063f32f4c4e3
2019-09-23 09:48:24 -07:00
Ariel Mashraki
c3955a08f1
schema/field: json type support ( #38 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/38
Only `IsNil` and `NotNil` predicates are supported this moment
Reviewed By: alexsn
Differential Revision: D17444976
fbshipit-source-id: 37336fa0bc7749af995933baee2e23bb7366dd78
2019-09-19 05:00:11 -07:00
Ariel Mashraki
4323141fe2
ent: add license and copyright to template files
...
Reviewed By: alexsn
Differential Revision: D17149292
fbshipit-source-id: 837de5fad988de1e54438b47584701f2fc35326d
2019-09-01 03:03:15 -07:00
Ariel Mashraki
619b63d5f7
ent/schema: rename nullable to nillable
...
Reviewed By: idoshveki
Differential Revision: D16687892
fbshipit-source-id: e8cfaaf1241e94c2de0a9fe9077326339d593716
2019-08-07 06:56:33 -07:00
Ariel Mashraki
2cc8286f5f
entc: add idtype option codegen
...
Reviewed By: alexsn
Differential Revision: D16601757
fbshipit-source-id: 35d5fbfb4ef40bae192e084ad4e067880175e71c
2019-08-04 03:13:01 -07:00
Ariel Mashraki
4b176495e8
add support for all int types in schema
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/8
Reviewed By: alexsn
Differential Revision: D16131257
fbshipit-source-id: 7b362740053c684f70ec69188b2fcee898605436
2019-07-10 09:24:31 -07:00