721 Commits

Author SHA1 Message Date
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
c5259c8528 entc: add relevant example-code for bytes field
Reviewed By: alexsn

Differential Revision: D16639870

fbshipit-source-id: 948cb0256fc8691a6c2194ee31db984d6ac1aede
2019-08-04 04:22:36 -07:00
Ariel Mashraki
66ea49049a entc: report informative message when goimports is not in PATH
Summary: Learning from the remote troubleshoot session I had with Murtadha on Friday - this could save me and him a lot fo time.

Reviewed By: alexsn

Differential Revision: D16639856

fbshipit-source-id: dc2a6b693b617fcd8061757987a6db95af4be2b6
2019-08-04 04:05:06 -07:00
Ariel Mashraki
2cc8286f5f entc: add idtype option codegen
Reviewed By: alexsn

Differential Revision: D16601757

fbshipit-source-id: 35d5fbfb4ef40bae192e084ad4e067880175e71c
2019-08-04 03:13:01 -07:00
Ariel Mashraki
c203f043cf ent: add blob tyoe
Reviewed By: idoshveki

Differential Revision: D16600425

fbshipit-source-id: 04c6fe39f9b3b628a1e79eb3063188f582d9e504
2019-08-01 07:45:05 -07:00
Ariel Mashraki
2d962d5cba ent/entc: add nillable setter for nullable fields
Reviewed By: idoshveki

Differential Revision: D16599899

fbshipit-source-id: bcab65e09645409f8a822e2eebda1aac0f804c7c
2019-08-01 06:57:19 -07:00
Ariel Mashraki
2c8b5a65b7 entc: abandon plugins
Summary:
Go plugin is not a good solution for both internal and external usage.
It's hard to manage and maintain matching versions (both Go and external libraries), and it does not support Windows.

Reviewed By: alexsn

Differential Revision: D16582217

fbshipit-source-id: 81876d2c6f30bbfc16ecf9e5000f0670f2e62484
2019-08-01 05:07:48 -07:00
Ariel Mashraki
8cb2428ea3 ent: fix lint errors
Reviewed By: idoshveki

Differential Revision: D16560151

fbshipit-source-id: 703f6e28403b14fc667fa7c592f0f3827a9335a6
2019-07-30 05:31: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
Ariel Mashraki
c6b178de20 manaully import deps
Summary:
Some old versions of `goimports` don't import deps that are go modules.
Importing manually them right now.

Reviewed By: apbuteau

Differential Revision: D16472613

fbshipit-source-id: 6cc237f133f3058c2e7bd4ec723500b725cde0a1
2019-07-24 17:39:03 -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
Alex Snast
ff6403b4ae remove mutex from sql tx
Summary: We were releasing tx lock before consuming rows data which could place the connection in a bad state. Instead of changing lock placement we chose to remove it as mutations were changed to being serial which is expected when working with transactions.

Reviewed By: a8m

Differential Revision: D16449629

fbshipit-source-id: 9f2e7435036f35c407f0640e3dd1071a17b3c368
2019-07-23 20:15:45 -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
dbe2afb946 add Clone methods for query builders (#10)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/10

Closes T46957221

Reviewed By: idoshveki

Differential Revision: D16278371

fbshipit-source-id: ca2b038fccb8fca6a7e8261444de27bdd63d0b00
2019-07-16 03:32:25 -07:00
Ariel Mashraki
b5cdb810b8 dialect/sql/schema: universl id allocation support
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/9

Reviewed By: alexsn

Differential Revision: D16252229

fbshipit-source-id: 795b6556d322e5c1ff5fb826c3b06ba5421ac857
2019-07-15 02:30:41 -07:00
Alex Snast
ad051e6d72 adding ent client context load/store support
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1148

Reviewed By: a8m

Differential Revision: D16202464

fbshipit-source-id: 15174e19e5e514774928e4e682d1c2743e863a26
2019-07-14 08:33:14 -07:00
Ariel Mashraki
4b176495e8 add support for all int types in schema
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/8

Reviewed By: alexsn

Differential Revision: D16131257

fbshipit-source-id: 7b362740053c684f70ec69188b2fcee898605436
2019-07-10 09:24:31 -07:00
Alex Snast
1cf3c3a117 adding ent.MaskNotFound generated helper
Reviewed By: a8m

Differential Revision: D16121210

fbshipit-source-id: c956551c975192cf997496490dd3e243022fbfb3
2019-07-04 09:37:27 -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
Ariel Mashraki
37ae2b744e add offset step to query builder (#1049)
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1049

Useful for real paging

Reviewed By: noamsch

Differential Revision: D16003607

fbshipit-source-id: 6a85d0e3d71a2582bc3cd8f1d66748dda4f2a10e
2019-06-26 01:43:59 -07:00
facebook-github-bot
267e3c15bd Initial commit
fbshipit-source-id: c79a38536e3c128dce1b2948615b72ec9779ed22
2019-06-16 04:37:51 -07:00