Ariel Mashraki
0c76b19143
doc: update docs regarding entc template formats ( #489 )
2020-05-12 12:29:00 +03:00
Alex Snast
2fc6b276ee
entc: adding template type option to --template flag ( #488 )
...
* entc: adding template type option to --template flag
Signed-off-by: Alex Snast <alexsn@fb.com >
* golangci: update funlen config
* cmd/entc: remove timestamp from logging
Co-authored-by: Ariel Mashraki <ariel@mashraki.co.il >
2020-05-12 12:19:14 +03:00
Ariel Mashraki
daf658e265
doc: add documentation for schema-type option ( #487 )
2020-05-11 19:55:10 +03:00
Ariel Mashraki
cfee55e514
schema/field: add an option to configure the database type ( #484 )
2020-05-11 15:07:33 +03:00
Alex Snast
68db86be76
avoid multiple rows.Err calls on error path
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-05-11 14:26:40 +03:00
Ariel Mashraki
997a060043
dialect/sql/schemma: fail if column type is invalid ( #486 )
2020-05-11 14:20:35 +03:00
Ariel Mashraki
caf1eb6e97
entc/gen: remove unnecessary function call from column generation ( #483 )
2020-05-10 15:52:57 +03:00
Ariel Mashraki
fa9ab77233
doc: add a section on external templates ( #482 )
2020-05-09 23:42:00 +03:00
Ciaran Liedeman
f59abad425
fix: checks for error after rows.Next call ( #480 )
2020-05-09 16:23:47 +03:00
Ariel Mashraki
7f260c3ae0
entc/gen/template: remove irrelevant code from templates ( #481 )
2020-05-09 14:32:54 +03:00
Ariel Mashraki
08289b3570
entc/gen: fix method conflicts in mutation builders ( #479 )
...
Fixed #475
2020-05-08 21:02:21 +03:00
Ariel Mashraki
9242549f4a
entc: validate package identifier before running codegen ( #478 )
...
Fixed #474
2020-05-08 20:30:44 +03:00
Ariel Mashraki
9b14556314
entc/load: report mixin name on failures ( #476 )
2020-05-08 14:17:55 +03:00
Ariel Mashraki
05b068432a
entc/integ: fix writer implementation ( #473 )
2020-05-08 10:31:50 +03:00
Ariel Mashraki
f82236defe
entc/integ: verify no schema changes on multiple runs ( #472 )
2020-05-07 12:21:13 +03:00
Ariel Mashraki
7a0b530b89
dialect/sql/schema: fix sqlite indexes matching ( #471 )
2020-05-07 10:05:17 +03:00
Ariel Mashraki
bcb579106a
dialect/sql/schema: revert #463 for int type ( #470 )
2020-05-07 08:23:10 +03:00
Ariel Mashraki
f384701c04
dialect/sql/schemma: ignore pgtime default value on scanning ( #468 )
2020-05-06 22:34:01 +03:00
Ariel Mashraki
196a764691
dialect/sql/schema: use the postgres column type if exists ( #466 )
2020-05-06 21:54:21 +03:00
Alex Snast
60c90b3667
entc/gen/privacy: adding OnMutationOperation helper ( #464 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-05-06 14:47:05 +03:00
Ariel Mashraki
769a2ed302
dialect/sql/schemma: return the database column type if exists ( #463 )
2020-05-05 19:32:52 +03:00
Alex Snast
66255ea86e
entc/gen/privacy: adding decision context support ( #462 )
...
Decision context holds a privacy decision (i.e. allow / deny) and if
exists will be returned before any rule is evaluated.
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-05-05 15:53:15 +03:00
Ariel Mashraki
51cdda421f
dialect/sql/schema: add optional schema-type to column spec ( #461 )
2020-05-04 20:16:43 +03:00
Ariel Mashraki
b456251154
entc/integ: add missing license header ( #460 )
2020-05-04 20:16:01 +03:00
Ariel Mashraki
6fbb5b6b4a
entc/load: add schema-type field for schema ( #459 )
2020-05-04 19:35:40 +03:00
Hylke Visser
cef1058af0
entc/gen: Fix import for ID type ( #455 )
...
* entc/gen: Alias semantic version imports
* entc/gen: Add import for ID type
* entc/gen: Revert semantic version import aliasing
2020-05-01 11:27:18 +03:00
Ariel Mashraki
3fa749d9e3
dialect/sql: remove go1.12 support ( #457 )
2020-04-30 13:21:00 +03:00
Ariel Mashraki
7de4f4b758
doc: add documentation and example for enttest ( #453 )
2020-04-26 16:31:24 +03:00
Ariel Mashraki
61c0f957b6
entc/integration: move hooks tests to enttest ( #451 )
2020-04-24 10:48:54 +03:00
Ariel Mashraki
7cfcb97694
entc/gen: suffix Order and Aggregate with Func ( #449 )
2020-04-23 13:22:21 +03:00
Alex Snast
6e584d8efc
Revert "entc/gen/privacy: mask allow error on policy evaluation"
...
This reverts commit 8a93447fe5 .
2020-04-23 10:10:41 +03:00
Alex Snast
8a93447fe5
entc/gen/privacy: mask allow error on policy evaluation
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-04-23 09:27:37 +03:00
Ariel Mashraki
22e83955c8
entc/gen: avoid comparing pointers in templates to support 1.13 ( #446 )
v0.2.1
2020-04-21 20:57:21 +03:00
Ariel Mashraki
08f8de6fb0
entc/integ: move integration tests to enttest ( #444 )
2020-04-21 17:56:30 +03:00
Ariel Mashraki
b880885e9f
entc/gen: group enttest imports properly ( #443 )
2020-04-21 00:10:05 +03:00
Alex Snast
5f180a6954
entc/gen/privacy: rename DenyMutationOperation -> DenyMutationOperationRule
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-04-20 18:57:19 +03:00
Ariel Mashraki
d3b89fb2be
entc/gen: add enttest package for generated code. ( #442 )
...
* entc/gen: add enttest package for generated code.
It's still WIP and another 2 things need to be added:
- Add an option to skip schema migration and pass client options
- Update docs and replace existing testing code to use enttest
* entc/gen: finish enttest package tempalte
Signed-off-by: Alex Snast <alexsn@fb.com >
Co-authored-by: Alex Snast <alexsn@fb.com >
2020-04-20 16:37:26 +03:00
Alex Snast
0ef1b2dcff
entc/gen: adding DenyMutationOperation privacy rule helper ( #441 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-04-20 14:28:00 +03:00
Ariel Mashraki
88ae8eded2
doc: gofmt code blocks in mixin examples ( #440 )
2020-04-20 14:02:17 +03:00
Ariel Mashraki
1c49159d18
entc/gen: add indexes, edges and hooks to mixin ( #431 )
v0.2.0
2020-04-20 13:40:56 +03:00
Alex Snast
cec1dd1edf
ent: use stringer tool to generate Op.String() ( #439 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
v0.1.5
2020-04-19 16:58:02 +03:00
Ariel Mashraki
3c6a04f884
entc/gen: add default-funcs and validators for userdefined id ( #436 )
...
Fixes #432
2020-04-18 12:28:50 +03:00
Ariel Mashraki
3342b85580
entc/gen: add support for storage txoptions ( #435 )
2020-04-17 12:57:57 +03:00
Ariel Mashraki
2304a67c75
integration: add another check for default func values ( #434 )
2020-04-17 12:23:35 +03:00
Ariel Mashraki
1ff5e02ea6
doc: update sqlite migration status ( #429 )
2020-04-13 10:17:05 +03:00
Ariel Mashraki
2208b243db
dialect/sql/schema: initial work for incremental migration ( #428 )
...
This is a WIP PR and should be ignored this moment.
It's based on PR #221 created by Erik Hollensbe (He should
get his credit for his work before we land this).
2020-04-12 19:12:33 +03:00
Ariel Mashraki
8effe6dfeb
dialect/sql/schema: remove code-duplication from sqlite test ( #425 )
2020-04-07 11:03:44 +03:00
Alex Snast
1b0e5ffaf4
entc/gen: simplify hook chain creation ( #424 )
...
* entc/gen: simplify hook chain creation
Signed-off-by: Alex Snast <alexsn@fb.com >
* circleci: upgrade orb versions
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-04-07 08:11:33 +03:00
Alex Snast
d52d5120fd
entc/gen: adding hook chain construct ( #423 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-04-06 19:53:10 +03:00
Ariel Mashraki
6824259b80
dialect/sql/schema: remove code-duplication from pg test ( #422 )
2020-04-06 15:44:21 +03:00