Ariel Mashraki
3342b85580
entc/gen: add support for storage txoptions ( #435 )
2020-04-17 12:57:57 +03:00
Ariel Mashraki
de5006a4d8
entc/gen: lazy compute storage-driver queries ( #408 )
2020-03-29 14:36:44 +03: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
caf721df47
entc/gen: add eager-loading support ( #263 )
...
* entc/gen: add OwnFK indicator for type edges
* entc/gen: add Edges field for generated types
* entc/gen: add With<T> method to query-builder template
* entc/gen: scan and assign foreign-keys on eager-loading
* entc/gen: load fk-relations (wip)
* entc/integration: add o2m/m2o tests for eager-loading
* entc/gen: add m2m support for eager-loading
* entc/gen: add integration tests for m2m and subgraphs
* entc/gen/integration: add tests for o2o eager-loading
* all: generate all assets
2020-01-13 17:21:26 +02:00
Ariel Mashraki
e85b10be36
entc/gen: remove multi storage support
2019-12-15 14:48:55 +02:00
Ariel Mashraki
514c0ff6d3
entc/gen: add support for adding client fields using template
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/155
Reviewed By: alexsn
Differential Revision: D18421223
fbshipit-source-id: 112d4d26d53a64e2c78640c6d508ba2d1d3a7791
2019-11-10 13:29:38 -08:00
Ariel Mashraki
0c46ce4e5e
entc/gen: move multistorage logic to Go code
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/94
Reviewed By: alexsn
Differential Revision: D17926186
fbshipit-source-id: b59dc418703bc4faca5230a7354edea1423b7d35
2019-10-15 06:42:44 -07:00
Ariel Mashraki
cb1f78f233
entc/gen: add open func for creating client
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/44
Reviewed By: alexsn
Differential Revision: D17657719
fbshipit-source-id: 9bbe18dc0e9c553f8a2df81018d7db06f38f5e0e
2019-10-02 01:41:40 -07:00
Alex Snast
2b1ff377b5
ent/entc: move Get / GetX operation under client
...
Summary: Saves typing `.Query()` every time we want to use `.Get()`
Reviewed By: a8m
Differential Revision: D17396667
fbshipit-source-id: 103c10d25bd1181b8e52fa272f2c1a26f47ed9f6
2019-09-16 07:44:41 -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
dc542e46ae
entc/gen: add debug option to client
...
Summary:
It's possible to execute:
```
client.Debug().T.Query().AllX(ctx)
``
Reviewed By: alexsn
Differential Revision: D17092159
fbshipit-source-id: 6d1c56e8e45cfd8e36b2700c9d450f2bd5f66a71
2019-08-28 07:23:28 -07:00
Ariel Mashraki
e7fec6f8f9
entc/gen: change verbose option to debug
...
Summary: Change the Verbose option to Debug
Reviewed By: alexsn
Differential Revision: D17091911
fbshipit-source-id: c5cf3e1c7f33f607076fe5c7da94e04b9f236218
2019-08-28 06:45:59 -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
Ariel Mashraki
7c84a20f2e
ent/client: follow up for D16667212
...
Reviewed By: alexsn
Differential Revision: D16692962
fbshipit-source-id: 2502b74bf57ae63577fd3232303fc5f51de6d0fb
2019-08-07 12:10:33 -07:00
Ariel Mashraki
cef32f1fb4
entc: add option to override codegen header
...
Summary:
Set the standard header ("Code generated by entc, DO NOT EDIT.") as default, and override it using option in graph.
No changes to graph except the `generate.go` file.
Reviewed By: idoshveki
Differential Revision: D16642348
fbshipit-source-id: d9fd1d2046e2fd96acbb100ef061fda75d99ce52
2019-08-04 05:12:33 -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
facebook-github-bot
267e3c15bd
Initial commit
...
fbshipit-source-id: c79a38536e3c128dce1b2948615b72ec9779ed22
2019-06-16 04:37:51 -07:00