Ariel Mashraki
119cdf207e
entc/gen: rename FirstXID to FirstIDX ( #854 )
2020-10-15 10:09:47 +03:00
Ariel Mashraki
ab9aa1fa45
schema/field: add annotations for overriding field struct-tags
2020-10-12 13:06:25 +03:00
Ariel Mashraki
f1a841d235
schema/edge: add annotation for configuring the Edges struct-field
2020-10-12 13:06:25 +03:00
Ariel Mashraki
c2cdc52946
entc/gen: move predicates to mutation object ( #825 )
2020-10-07 14:22:14 +03:00
Ariel Mashraki
d5ae1b018e
schema/mixin: add privacy policy to mixin ( #821 )
2020-10-06 10:59:36 +03:00
Ariel Mashraki
5d2d2757a8
entc/gen: allow passing client-fields from multiple templates ( #819 )
2020-10-04 22:19:58 +03:00
Ariel Mashraki
6cf2271c1b
entc/gen: initial version for feature-flags ( #803 )
2020-09-29 16:22:50 +03:00
Ariel Mashraki
17abe2d60f
entc/gen: less sophisticated naming logic ( #774 )
...
Closed #772
2020-09-17 09:19:55 +03:00
Kevin Pierce
46df885752
entc/gen: fix gen for type abbreviating to id ( #750 )
...
* cmd/ent: fix gen for type abbreviating to id
* Adding genc output changes to tests, examples
2020-09-12 09:47:39 +03:00
Ariel Mashraki
4cb544c8d0
entc/gen: fix naming conflict for builder fields
...
Closed #747
2020-09-12 01:58:07 +03:00
Ariel Mashraki
1dc90db3a4
entc/gen: add fields checks for groupfunc
2020-09-10 22:53:25 +03:00
Ariel Mashraki
b4b4fa95d7
entc/gen: restructure hooks execution ( #741 )
...
Closed #739
2020-09-09 10:41:17 +03:00
Ariel Mashraki
8e824c14eb
entc/gen: add an option for clearing non-unique edges ( #731 )
...
Closed #398
2020-09-06 20:22:42 +03:00
Ariel Mashraki
feed51d773
doc: add hook helpers to ent website ( #729 )
2020-09-06 10:07:41 +03:00
Ariel Mashraki
750a19c118
entc/gen: revert unwrapping logic for validation error ( #721 )
...
Fixed #698
2020-09-01 12:06:46 +03:00
Ariel Mashraki
027a0f6a35
schema/field: add the NamedValues option to the enum builder ( #715 )
2020-08-30 17:40:09 +03:00
Ariel Mashraki
673a049607
entc/gen: support custom go-type with default ( #714 )
2020-08-30 13:33:10 +03:00
Ariel Mashraki
fd0a7f9f02
all: facebookincubator/ent => facebook/ent ( #660 )
...
ent repository is going to be migrated to facebook organization
2020-08-18 11:05:08 +03:00
Ariel Mashraki
6fe7023d6a
entc/gen: fix validation error unwrapping ( #670 )
2020-08-14 20:45:04 +03:00
Ariel Mashraki
ebfc1a4f36
entc/gen: move builder naming to Go api ( #653 )
...
Fixed #652
2020-08-01 18:43:39 +03:00
Ariel Mashraki
05dfd6b78b
schema/edge: add annotation support for edges ( #651 )
2020-08-01 15:38:47 +03:00
Joe Harvey
e9b406ca65
entc/gen: Split strings in pascal/camcelCase on - in addition to _ ( #631 )
2020-08-01 15:36:57 +03:00
Ariel Mashraki
01a04dbe24
entc/gen: generate predicates for custom enum types ( #639 )
2020-07-25 17:48:51 +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
04859c6fb4
schema/field: add GoType support for enum fields ( #638 )
2020-07-24 19:59:05 +03:00
Ariel Mashraki
03fe39ab74
entc/integration: add tests for gql naming convention ( #636 )
2020-07-22 23:01:38 +03:00
Ariel Mashraki
daaa9f2db1
schema/field: add option to set the Go identifier for enums ( #635 )
2020-07-22 20:22:24 +03:00
Ariel Mashraki
54f0a6769b
schema/field: add annotation option to schema field ( #622 )
2020-07-19 18:01:04 +03:00
Ariel Mashraki
9d42b5ef40
entc/gen: rename OnlyXID to OnlyIDX in codegen ( #608 )
2020-07-16 17:21:41 +03:00
Ariel Mashraki
e6c91e1dbf
entc/gen: add support for tx hooks ( #575 )
2020-07-12 11:07:14 +03:00
Alex Snast
7b34abd8b4
entc/gen: adding singular variants of select query finishers ( #594 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-07-09 10:59:33 +03:00
Alex Snast
7df2e02343
ci/lint: enabling goheader linter ensuring the existance of a license header in go files ( #593 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-07-07 15:36:09 +03:00
Alex Snast
ef402679b4
Adding hook conditions ( #589 )
...
* entc/gen: adding hook condition tests
Signed-off-by: Alex Snast <alexsn@fb.com >
* Revert "entc/gen: adding hook condition tests"
This reverts commit 3a46ea6cbf .
* entc/gen: adding hook conditions
Signed-off-by: Alex Snast <alexsn@fb.com >
* entc/gen: adding hook condition tests
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-07-06 16:40:51 +03:00
Ariel Mashraki
1a8d98f507
entc/gen: add option to extend existing templates ( #583 )
2020-07-05 14:48:18 +03:00
Alex Snast
da56f8e6e8
entc/gen: define method receiver on enum fields ( #580 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-07-03 20:41:32 +03:00
Ariel Mashraki
052ba49294
entc/gen: convert GoType to basic type for validators ( #568 )
...
Fixed #567
2020-06-25 15:08:43 +03:00
Jelmer Snoeck
b150cde478
entc/gen: introduce validation errors ( #547 )
...
This introduces the concept of validation errors, where we have a high
level validation error which wraps a more detailed error message.
The higher level `ValidationError` is set up in the generated files, much
like the `NotFoundError` and `ConstraintError` and is accompanied by an
`IsValidationError` check method. Thus, it can be used as follows:
```go
t, err := tx.Team.Create().SetName(input.Name).Save(ctx)
if ent.IsValidationError(err) {
// handle validation error response
}
```
2020-06-17 17:11:39 +03:00
Alex Snast
1f553bc145
entc/gen: adding hook.Unless helper ( #550 )
2020-06-16 16:16:02 +03:00
Ariel Mashraki
47f1a203aa
schema/edge: an storage-key option for edges ( #545 )
...
* schema/edge: an storage-key option for edges
* schema/edge: use Column(s) with functional options
2020-06-15 23:06:00 +03:00
Ariel Mashraki
737fb4afda
entc/mutation: expose builder api for getting mutations ( #531 )
2020-06-08 15:16:56 +03:00
Ariel Mashraki
86d345e187
entc/gen: add support for ValueScanner for int type ( #530 )
2020-06-08 14:54:37 +03:00
Ariel Mashraki
8a754fb795
entc/gen: fix template func for receiver names ( #527 )
...
Fixed #525
2020-06-05 19:20:30 +03:00
Ariel Mashraki
ef1d91daff
entc/gen: fix Client.Open comment ( #514 )
...
Fixed #513
2020-05-31 13:09:08 +03:00
Peterson Domingos
5a2384e829
entc/gen/template: Wrap error returned by field validator ( #509 )
...
* entc/gen/template: wrap error returned from validator
* go generate ./...
2020-05-29 00:00:14 +03:00
Ariel Mashraki
25471666be
entc/gen: fix format for field comments ( #511 )
2020-05-28 18:34:14 +03:00
Ariel Mashraki
bf566aa3ac
entc/gen: support valuescanner in go-types ( #510 )
2020-05-28 18:23:14 +03:00
Ariel Mashraki
50edd3d370
entc/gen: convert custom Go types to basic types ( #502 )
2020-05-25 20:46:59 +03:00
Ariel Mashraki
100d300094
schema/field: add GoType option for string fields ( #500 )
2020-05-25 20:05:17 +03:00
Ariel Mashraki
dbf6bb8006
entc/mutation: explain when object is fetched from db ( #496 )
2020-05-21 10:10:52 +03:00
Ariel Mashraki
5ed339839a
entc/mutation: reject querying old values of finished mutations ( #495 )
2020-05-20 17:28:39 +03:00