Ariel Mashraki
e1c5277483
ent: initial support for edge schemas ( #2560 )
2022-05-25 15:46:00 +03:00
Justin Johnson
38d4d5fb5c
entc/gen: propagate nodes post-save mutations ( #2525 )
...
* Failing test
* Fix propagating entirely models from OpCreate hook
* Apply suggestions from code review
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* whitespace
* Failing test for updateone
* fix for updateone
* Regnerate
* regen from root
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-05-05 11:19:21 +03:00
Ariel Mashraki
a7c1df2d0a
entc/gen: move selectbuilder scan functions to shared struct ( #2412 )
2022-03-18 07:59:04 +02:00
MrParano1d
a75e9c5a8f
entc/gen: fix missing unique field in query builder template ( #2332 )
...
* fix(query): fix missing unique field in query builder template
when a query gets cloned the unique field doesn't get cloned
#2331
* fix(query): added missing go generate ./...
#2331
* fix(query): added missing go generate ./...
#2331
2022-02-15 22:31:05 +02:00
Ariel Mashraki
1d3f1819ae
entc/gen: replace Type.Alias with Type.PackageAlias
2022-02-04 22:46:17 +02:00
Ariel Mashraki
0e49dd1d9f
entc/gen: support local package names for generated packages
...
The new Alias option adds package aliases (local names) for all type-packages that
their import identifier conflicts with user-defined packages (i.e. GoType).
2022-02-02 15:50:00 +02:00
Nicholas Anderson
896f2b202d
entc/gen: update NotSingularError godoc ( #2274 )
...
* fix: update only/onlyID comments
this patch updates the Only/OnlyID methods in the builder template from:
> // Returns a *NotSingularError when exactly one {{ $.Name }} entity is not found.
to
> // Returns a *NotSingularError when more than exactly one {{ $.Name }} ID is found.
in an effort to be more explicit in the explanation of the behavior of the methods.
* fix: update wording to be more concise from suggestion
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com >
* fix: update Only wording to be more concicse
* fix: generate new files
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com >
2022-01-23 19:07:10 +02:00
Clarence
eca70b8490
schema/field: array types are nillable ( #2266 )
...
* all: type fixes
* schema/field: remove array check from goType
2022-01-13 13:39:11 +02:00
Ariel Mashraki
6372263b99
entc/gen: add support for subtracting values from unsgined fields ( #2169 )
2021-11-25 12:37:43 +02:00
Ariel Mashraki
caa673826a
entc/gen/mutation: add IDs method for mutations
2021-11-03 23:16:56 +02:00
Ariel Mashraki
c1fae17b6c
entc/gen: add schema type to generated validation errors
2021-09-07 18:33:32 +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
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
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
0b10a44f71
entc/gen: allow scanning zero or more fields on Select
2021-07-12 22:44:50 +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
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
6691e6a28c
entc/gen: import custom types in mutation template ( #1576 )
2021-05-19 15:53:47 +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
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
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
5d70144f44
entc/gen: allow selecting partial fields on update-one
2021-03-14 23:17:30 +02: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
dd4792f5b3
go: rename module from github.com/facebook/ent => entgo.io/ent ( #1226 )
2021-02-02 23:03:04 +02:00
Marwan Sulaiman
8063d4ac93
entc/gen: add context.Context to to query builder ( #1195 )
...
* Add ctx to dialectQuery
* go generate
2021-01-20 11:46:08 +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
97c316b80a
entc/gen: move mutation-set naming to go api ( #1123 )
2021-01-03 22:10:19 +02:00
Ariel Mashraki
6716581ab4
entc/gen: handle default funcs in runtime tempalte ( #1102 )
2020-12-30 13:05:03 +02:00
Noah-Jerome Lotzer
24f6975b9a
schema/field: add default-func for bytes and strings ( #1086 )
2020-12-29 20:07:04 +02:00
Ariel Mashraki
c4a43bc2be
entc/gen: move fields selection to top builder ( #1093 )
2020-12-28 12:28:07 +02:00
Giau. Tran Minh
3b4b94b6be
entc/gen/template: convert spaces to tabs ( #1060 )
...
This commit also fix a typo Receiver
2020-12-19 08:47:08 +02:00
Ariel Mashraki
3daea98d76
entc/gen: check runtime import before executing privacy rules ( #1054 )
2020-12-17 18:36:46 +02:00
Ariel Mashraki
bb4a928483
entc/gen: use edge mutation setters in templates ( #1036 )
2020-12-13 14:27:37 +02:00
Ariel Mashraki
70f2b1355a
entc/gen: expose edge mutation setters for external templates ( #1032 )
2020-12-12 00:01:30 +02:00
Ariel Mashraki
a6e7857d51
entc/gen: remove unnecessary fields from query builders
2020-12-09 18:29:49 +02:00
BrentChesny
263bc0b08f
entc/gen: add missing braces in mutation template ( #1014 )
2020-12-04 08:02:52 +02:00
Ariel Mashraki
7574923d91
entc/gen: change the comment doc of update operation ( #937 )
2020-11-10 14:37:27 +02:00
Ariel Mashraki
967c10819a
entc/gen: add eager-load edges to query clone ( #888 )
...
Closed #878
2020-10-27 21:16:30 +02:00
Ariel Mashraki
fb97ca66ac
entc/gen: move eager-loading naming to Go api ( #887 )
2020-10-27 20:11:59 +02:00
Ariel Mashraki
119cdf207e
entc/gen: rename FirstXID to FirstIDX ( #854 )
2020-10-15 10:09:47 +03:00
Ariel Mashraki
fae1956828
entql: add typed-builder for field predicates
2020-10-11 14:41:03 +03:00
Ariel Mashraki
c2cdc52946
entc/gen: move predicates to mutation object ( #825 )
2020-10-07 14:22:14 +03:00