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
ded20a0e36
entc/gen: cleanup sql templates
2021-06-27 10:27:10 +03:00
Ariel Mashraki
5d70144f44
entc/gen: allow selecting partial fields on update-one
2021-03-14 23:17:30 +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
Ariel Mashraki
f315801779
dialect/sql/sqlgraph: apply predicate on update-node
2021-01-22 23:04:09 +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
da34571560
entc/gen: allow selecting specific fields ( #1075 )
2020-12-23 17:35:39 +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
c2cdc52946
entc/gen: move predicates to mutation object ( #825 )
2020-10-07 14:22:14 +03: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
8e824c14eb
entc/gen: add an option for clearing non-unique edges ( #731 )
...
Closed #398
2020-09-06 20:22:42 +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
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
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
Ariel Mashraki
737fb4afda
entc/mutation: expose builder api for getting mutations ( #531 )
2020-06-08 15:16:56 +03:00
Ariel Mashraki
5ed339839a
entc/mutation: reject querying old values of finished mutations ( #495 )
2020-05-20 17:28:39 +03:00
Alex Snast
25fdb52a03
entc/gen: use a set when tracking cleared fields in mutation template
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-03-17 12:00:15 +02: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
d9c8d9545d
entc/gen: use NotFoundError when updating non-exist node ( #348 )
...
Fixes #341
2020-02-16 13:26:13 +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
c09028f58b
dialect/sql/sqlgraph: consistent scan names
2019-12-22 20:12:00 +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
0a7608f8bd
all: change codegen header
2019-12-18 13:00:25 +02:00
Ariel Mashraki
798d58f02b
all: use more go-ish error for constraint failures
2019-12-17 23:17:55 +02:00
Ariel Mashraki
e85b10be36
entc/gen: remove multi storage support
2019-12-15 14:48:55 +02:00
Ariel Mashraki
5fe9fcdc1b
entc/gen: fix update ids check bug in user-defined-ids
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/203
Reviewed By: alexsn
Differential Revision: D18725824
fbshipit-source-id: 888686bb5fa87649be89ec1926cbd7a3b6cf7932
2019-11-27 06:20:44 -08: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
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
e493574c83
entc: add postgres dialect for sql storage driver options
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/123
Reviewed By: alexsn
Differential Revision: D18117641
fbshipit-source-id: 8e520a1b1f70c7bea70f8a37ac698116e98a804e
2019-10-24 10:49:47 -07:00
Ariel Mashraki
8e66691db5
entc: return ErrNotFound on UpdateOne
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/52
Reviewed By: alexsn
Differential Revision: D17737477
fbshipit-source-id: 13890619e0af28a28e3d7bd50d7e4287599eeaf0
2019-10-03 06:25:11 -07:00
Ariel Mashraki
bf913111fd
entc: improve numeric addition api
...
Reviewed By: alexsn
Differential Revision: D17474547
fbshipit-source-id: 08e367793faac76eb0cece880259a49a8bcbc95b
2019-09-19 05:00:11 -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
78a7509c52
entc: clear optional field values
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/33
Reviewed By: noamsch
Differential Revision: D17344992
fbshipit-source-id: 5336e9c5a4978e10923e26b5754942d92371a5cd
2019-09-15 04:44:55 -07:00
Ariel Mashraki
d820361a3a
entc/gen: add inc/dec capability for numeric fields
...
Reviewed By: alexsn
Differential Revision: D17259987
fbshipit-source-id: ad5ba1ba7383418463bc9137d82f16eadef809e7
2019-09-10 06:00:34 -07:00
Ariel Mashraki
5bc8568069
all: add license reference to README and add copyright headers to gencode
...
Reviewed By: alexsn
Differential Revision: D17119262
fbshipit-source-id: 046f095ca9432c920778db0edb2158dedb23c0a2
2019-08-30 08:46:03 -07:00
Ariel Mashraki
52b268c05c
ent/doc: crud api
...
Reviewed By: alexsn
Differential Revision: D17094376
fbshipit-source-id: 9b1da24b99bb3ff15382b3a17516904decbca322
2019-08-28 11:23:03 -07:00
Ariel Mashraki
e0e754717e
ent: change ent package name ( #1338 )
...
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1338
Pull Request resolved: https://github.com/facebookincubator/ent/pull/14
Reviewed By: alexsn
Differential Revision: D16890825
fbshipit-source-id: 656baaa73f5debab08c849b6b9639caeec2a8ef1
2019-08-19 09:32:14 -07:00
Alex Snast
a209a8395e
schema/field: Allow .Unique() definition on int / float fields
...
Reviewed By: a8m
Differential Revision: D16891088
fbshipit-source-id: b3d8375685b6d1957f678c2f9eb40e172891b255
2019-08-19 06:35:26 -07:00
Ariel Mashraki
56656dfcb6
ent/entc: configure storage driver in codegen
...
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1229
Reviewed By: alexsn
Differential Revision: D16539934
fbshipit-source-id: b3a8bf1f1be6f65ad3f649cd921ea20fc24182bf
2019-07-30 02:49:22 -07:00
Ariel Mashraki
2cfda7564f
type safe predicates
...
Reviewed By: alexsn
Differential Revision: D16452717
fbshipit-source-id: da0a07275434d95d73a5a26830a2e5535c3abf47
2019-07-24 08:35:51 -07:00
Ariel Mashraki
1e47de5300
move lib/go/gremlin to ent/dialect ( #1192 )
...
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1192
Pull Request resolved: https://github.com/facebookincubator/ent/pull/11
Reviewed By: alexsn
Differential Revision: D16377224
fbshipit-source-id: 07ca7436eb9b64fbe2299568560b91466b2417ba
2019-07-20 08:27:06 -07:00
Ariel Mashraki
e8e96f014f
add charset support for fields
...
Summary: Basically, adding support for Hebrew characters.
Reviewed By: alexsn
Differential Revision: D16068537
fbshipit-source-id: 4e934da5ea97c9e804317f746556ab1d51faebcc
2019-07-01 08:10:24 -07:00
facebook-github-bot
267e3c15bd
Initial commit
...
fbshipit-source-id: c79a38536e3c128dce1b2948615b72ec9779ed22
2019-06-16 04:37:51 -07:00