Commit Graph

169 Commits

Author SHA1 Message Date
dependabot[bot]
091d3cd90d build(deps): bump github.com/DATA-DOG/go-sqlmock from 1.3.3 to 1.4.1 (#616)
Bumps [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) from 1.3.3 to 1.4.1.
- [Release notes](https://github.com/DATA-DOG/go-sqlmock/releases)
- [Commits](https://github.com/DATA-DOG/go-sqlmock/compare/v1.3.3...v1.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:36:05 +03:00
Alex Snast
1f553bc145 entc/gen: adding hook.Unless helper (#550) 2020-06-16 16:16:02 +03:00
Alex Snast
6e6651c878 Query policy (#411)
* entc/gen: drop xerrors package usage

* all: bump dependencies version

* entc/gen: adding query privacy policy support
2020-03-29 18:11:13 +03:00
Ariel Mashraki
416c374cb3 sqlgraph/convert: use json.RawMessage for JSON types (#393)
If the underlying driver does not support JSON types, driver.DefaultParameterConverter
will convert it to uint8.
2020-03-17 18:34:10 +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
Alex Snast
0428788539 entc/gen: add support for wrapped errors
Signed-off-by: Alex Snast <alexsn@fb.com>
2020-01-30 10:53:58 +01:00
Ariel Mashraki
21a58e94a3 entc/integration: test postgres schema creation
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/124

Reviewed By: alexsn

Differential Revision: D18117662

fbshipit-source-id: e8151f92e00f565db26f17f78ff46b132c46e425
2019-10-24 10:49:47 -07:00
Ariel Mashraki
5ef5fa1dde all: upgrade sqlite version to v1.11.0
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/102

Reviewed By: alexsn

Differential Revision: D17977693

fbshipit-source-id: 78ac5de4130bfc635d30c82bb3f633517e76178d
2019-10-17 04:28:56 -07:00
Ariel Mashraki
c2418a1907 entc/gen: suspended goimports after files were written (#89)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/89

We can't run "imports" on files when the state is not completed. Because, "goimports" will drop undefined package. Therefore, it's suspended to end of the writing.

Fixed #88

Reviewed By: alexsn

Differential Revision: D17899321

fbshipit-source-id: 198dae11b121869764ebc9eee92110caf4256bed
2019-10-13 07:03:11 -07:00
Alex Snast
e668326c5e ent/entc: set go-bindata version in go.mod (#74)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/74

don't rely on local go-bindata binary

Reviewed By: a8m

Differential Revision: D17786303

fbshipit-source-id: 1d1258478fd8f3abcdb3a7b1b06d0601b4468c94
2019-10-07 02:20:47 -07:00
Ariel Mashraki
766940563f ent/gen: set currect storage-key for indexes
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/66

Reviewed By: alexsn

Differential Revision: D17779042

fbshipit-source-id: 12be885b20f91eb611a41e361650f7a66747fab0
2019-10-05 11:03:05 -07:00
Ariel Mashraki
eb240579ca ent/gen: fix identifiers conflict in ent.tmpl
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/58

Reviewed By: alexsn

Differential Revision: D17759261

fbshipit-source-id: df7f5344b43157a483662d9ee5cf8441943b637a
2019-10-03 23:54:11 -07:00
Ariel Mashraki
480eb714d3 entc/gen: replace goimports with golang.org/x/tools/imports
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/53

Reviewed By: alexsn

Differential Revision: D17738814

fbshipit-source-id: 9865bc3c8eec766bd5c8e02db5c7afcaadb48c1f
2019-10-03 12:08:34 -07:00
Alex Snast
b59fb59b9a symphony: bump stretchr/testify package version
Reviewed By: idoshveki

Differential Revision: D17281295

fbshipit-source-id: fff60a2760eea967b61b5636fec7a21b77c48bf0
2019-09-10 01:21:16 -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
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
Andy Buteau
f46c8f8848 Bump version of uuid
Summary:
Code in fbcode/fbc/kirin/graph requires uuid v1.1.1 so entc needs to use the same version, otherwise running entc against `fbcode/fbc/kirin/graph/ent/schema` will result in the following error:

  $ entc generate ./ent/schema
  open plugin /var/folders/gc/4mclbm612vb2jgg7x2mks20xxhkjkd/T/entc_fbc_kirin_graph_ent_schema_1562895280.so: plugin.Open("/var/folders/gc/4mclbm612vb2jgg7x2mks20xxhkjkd/T/entc_fbc_kirin_graph_ent_schema_1562895280"): plugin was built with a different version of package github.com/google/uuid

Reviewed By: tcirstea

Differential Revision: D16226326

fbshipit-source-id: 1f9939ed64e7490220ed5ae56b3f24b9ef9dd558
2019-07-12 12:35:38 -07:00
Ariel Mashraki
5f0268e02c add tests for mysql migration
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/4

Reviewed By: alexsn

Differential Revision: D15874726

fbshipit-source-id: 217fbc0503e961704ea646ee40663a30211c5af1
2019-06-18 10:11:00 -07:00
facebook-github-bot
267e3c15bd Initial commit
fbshipit-source-id: c79a38536e3c128dce1b2948615b72ec9779ed22
2019-06-16 04:37:51 -07:00