Commit Graph

385 Commits

Author SHA1 Message Date
Ariel Mashraki
49101d7d05 entc/gen: change eager-loading empty values (#791)
When loading relations (using edger-loading) and there are no changes,
the response should be an empty slice (and not nil). Similar to the
way we handle simple queries (e.g. All()).

Closed #790
2020-09-22 20:22:30 +03:00
Ariel Mashraki
38e769465c entc/gen: import external packages in runtime package (#775)
Closed #773
2020-09-17 12:00:02 +03:00
Ariel Mashraki
17abe2d60f entc/gen: less sophisticated naming logic (#774)
Closed #772
2020-09-17 09:19:55 +03:00
Ariel Mashraki
235973cc2d entc/gen: merge all templates to global 2020-09-15 16:31:29 +03:00
Ariel Mashraki
e26e99b643 entc/gen: improve the api for custom templates 2020-09-15 16:31:29 +03:00
Ariel Mashraki
3578d73a8f dialect/sql/sqljson: add length predicate (#763) 2020-09-15 11:53:54 +03:00
Ciaran Liedeman
54774960b2 entc/gen: add template for creating custom predicates (#758)
* Custom Predicates

* Update entc/integration/template/ent/template/where.tmpl

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>


Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2020-09-14 15:41:48 +03:00
Ariel Mashraki
3cb7824561 json predicates (#760)
* dialect/sql/sqljson: cast postgres non-string values

* entc/integration: test json predicates
2020-09-14 12:37:57 +03:00
Ariel Mashraki
d16f0abcc1 entc/gen: document fixture option default value (#754) 2020-09-13 11:39:46 +03:00
Kevin Pierce
46df885752 entc/gen: fix gen for type abbreviating to id (#750)
* cmd/ent: fix gen for type abbreviating to id

* Adding genc output changes to tests, examples
2020-09-12 09:47:39 +03:00
Ariel Mashraki
4cb544c8d0 entc/gen: fix naming conflict for builder fields
Closed #747
2020-09-12 01:58:07 +03:00
Ariel Mashraki
1dc90db3a4 entc/gen: add fields checks for groupfunc 2020-09-10 22:53:25 +03:00
Ariel Mashraki
6a7a5ef439 entc/gen: add fields checks for orderfuncs 2020-09-10 22:53:25 +03:00
Ariel Mashraki
8b8744022e entc/gen: add column-check for selection and grouping (#744) 2020-09-09 12:27:28 +03:00
Ariel Mashraki
b4b4fa95d7 entc/gen: restructure hooks execution (#741)
Closed #739
2020-09-09 10:41:17 +03:00
Ariel Mashraki
3a2c897143 integration: add example for clear/remove and add edges (#738) 2020-09-08 12:05:43 +03:00
Ariel Mashraki
ce48ab99b8 dialect/sql/sqljson: move json predicates to a package (#735) 2020-09-07 21:22:12 +03:00
Ariel Mashraki
5450481513 entc/gen: add support for passing functions to external templates (#732)
Fixed #671
2020-09-07 12:02:22 +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
feed51d773 doc: add hook helpers to ent website (#729) 2020-09-06 10:07:41 +03:00
Ariel Mashraki
4cdfc7b57e integration: test json predicates in ci (#724) 2020-09-03 11:15:31 +03:00
Ariel Mashraki
750a19c118 entc/gen: revert unwrapping logic for validation error (#721)
Fixed #698
2020-09-01 12:06:46 +03:00
Ariel Mashraki
027a0f6a35 schema/field: add the NamedValues option to the enum builder (#715) 2020-08-30 17:40:09 +03:00
Ariel Mashraki
673a049607 entc/gen: support custom go-type with default (#714) 2020-08-30 13:33:10 +03:00
Ariel Mashraki
c907c8bbbc integ: add sqlite to json tests (#686) 2020-08-23 20:51:19 +03:00
Ariel Mashraki
fd481554a4 entc/gen: fix name conflicts in builder setters (#680) 2020-08-20 12:21:01 +03:00
Ariel Mashraki
5e56543133 schema/edge: fix edge annotations with to/from builders (#679) 2020-08-20 12:15:43 +03:00
Ariel Mashraki
b18716931d dialect/sql: change boolean operators wrapping (#678)
The reason is to parentheses only when it's necessary.
2020-08-20 10:08:31 +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
Ariel Mashraki
6fe7023d6a entc/gen: fix validation error unwrapping (#670) 2020-08-14 20:45:04 +03:00
Ariel Mashraki
b5a9c66290 entc/gen: import siblings packages by default (#655)
Also, add missing pkg-path for non-value types.
2020-08-02 15:06:05 +03:00
Ariel Mashraki
ebfc1a4f36 entc/gen: move builder naming to Go api (#653)
Fixed #652
2020-08-01 18:43:39 +03:00
Ariel Mashraki
05dfd6b78b schema/edge: add annotation support for edges (#651) 2020-08-01 15:38:47 +03:00
Joe Harvey
e9b406ca65 entc/gen: Split strings in pascal/camcelCase on - in addition to _ (#631) 2020-08-01 15:36:57 +03:00
Ariel Mashraki
e71a6de39b entc/gen: fix hooks invocation on bulk-create (#649) 2020-07-29 18:35:21 +03:00
Ariel Mashraki
f677112e18 entc/gen: ignore query execution on empty batch (#648) 2020-07-29 18:07:14 +03:00
Ariel Mashraki
d42a5581b9 entc/integration/compose: remove unused Dockerfile (#647) 2020-07-29 13:00:10 +03:00
Ariel Mashraki
16d98d1acc dialect/sql/schema: accept default values for enum fields (#646)
Fixed #644
2020-07-28 12:55:02 +03:00
Ariel Mashraki
dd3cdc147d entc/gen: correctly handle custom storage-key for id fields (#643)
Fixed #621
2020-07-28 10:14:21 +03:00
Ariel Mashraki
ff6163f1a0 entc/gen: avoid double convertion for custom gotypes (#640) 2020-07-26 20:30:43 +03:00
Ariel Mashraki
01a04dbe24 entc/gen: generate predicates for custom enum types (#639) 2020-07-25 17:48:51 +03:00
Ariel Mashraki
875e6e516b entc/gen: initial implementation for create-bulk #613
Closed #236
2020-07-24 20:16:31 +03:00
Ariel Mashraki
04859c6fb4 schema/field: add GoType support for enum fields (#638) 2020-07-24 19:59:05 +03:00
Ariel Mashraki
03fe39ab74 entc/integration: add tests for gql naming convention (#636) 2020-07-22 23:01:38 +03:00
Ariel Mashraki
daaa9f2db1 schema/field: add option to set the Go identifier for enums (#635) 2020-07-22 20:22:24 +03:00
Ariel Mashraki
1783294d75 entc/gen: skip slicing on empty fields (#632) 2020-07-21 13:15:27 +03:00
Ariel Mashraki
3b77e5d71a dialect/sql/sqlgraph: use correct column when querying m2o/o2o edges (#629)
Fixed #621
2020-07-21 10:21:51 +03:00
Ariel Mashraki
54f0a6769b schema/field: add annotation option to schema field (#622) 2020-07-19 18:01:04 +03:00
Ariel Mashraki
4e9fd67a3e entc/gen: allow setting unique fields with default values of type function (#610)
Fixed #609
2020-07-16 18:57:08 +03:00
Ariel Mashraki
9d42b5ef40 entc/gen: rename OnlyXID to OnlyIDX in codegen (#608) 2020-07-16 17:21:41 +03:00