Ariel Mashraki
a761561c9c
entc/gen: support field selections with eager-loading ( #1100 )
2020-12-29 09:19:53 +02:00
Ariel Mashraki
37f9c30a12
entc/gen: apply field selection on builer types ( #1094 )
2020-12-28 14:38:20 +02:00
Ariel Mashraki
c4a43bc2be
entc/gen: move fields selection to top builder ( #1093 )
2020-12-28 12:28:07 +02:00
Ariel Mashraki
43fa0ae9bc
dialect/sql/sqlgraph: skip empty updates ( #1043 )
2020-12-14 10:16:21 +02:00
Ariel Mashraki
12b7549768
dialect/sql/schema: support mariadb json fields on migration ( #1011 )
2020-12-03 12:04:00 +02:00
Ciaran Liedeman
f655a59089
entc/integration: add postgres13 ( #961 )
2020-11-19 14:46:02 +02:00
Ariel Mashraki
119cdf207e
entc/gen: rename FirstXID to FirstIDX ( #854 )
2020-10-15 10:09:47 +03:00
Ariel Mashraki
ab9aa1fa45
schema/field: add annotations for overriding field struct-tags
2020-10-12 13:06:25 +03:00
Ariel Mashraki
f1a841d235
schema/edge: add annotation for configuring the Edges struct-field
2020-10-12 13:06:25 +03:00
Ariel Mashraki
fae1956828
entql: add typed-builder for field predicates
2020-10-11 14:41:03 +03:00
Ariel Mashraki
5d2d2757a8
entc/gen: allow passing client-fields from multiple templates ( #819 )
2020-10-04 22:19:58 +03:00
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
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
3a2c897143
integration: add example for clear/remove and add edges ( #738 )
2020-09-08 12:05:43 +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
750a19c118
entc/gen: revert unwrapping logic for validation error ( #721 )
...
Fixed #698
2020-09-01 12:06:46 +03:00
Ariel Mashraki
673a049607
entc/gen: support custom go-type with default ( #714 )
2020-08-30 13:33:10 +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
875e6e516b
entc/gen: initial implementation for create-bulk #613
...
Closed #236
2020-07-24 20:16:31 +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
54f0a6769b
schema/field: add annotation option to schema field ( #622 )
2020-07-19 18:01:04 +03:00
Ariel Mashraki
9d42b5ef40
entc/gen: rename OnlyXID to OnlyIDX in codegen ( #608 )
2020-07-16 17:21:41 +03:00
Ariel Mashraki
e6c91e1dbf
entc/gen: add support for tx hooks ( #575 )
2020-07-12 11:07:14 +03:00
Alex Snast
7b34abd8b4
entc/gen: adding singular variants of select query finishers ( #594 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-07-09 10:59:33 +03:00
Ariel Mashraki
e1c8ec1dce
entc/integration: truncate items table before each test ( #564 )
2020-06-23 16:12:49 +03:00
Ariel Mashraki
737fb4afda
entc/mutation: expose builder api for getting mutations ( #531 )
2020-06-08 15:16:56 +03:00
Ariel Mashraki
abc4e63efb
ci: change postgres12 listen port ( #521 )
2020-06-03 15:33:56 +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
08f8de6fb0
entc/integ: move integration tests to enttest ( #444 )
2020-04-21 17:56:30 +03:00
Ariel Mashraki
3342b85580
entc/gen: add support for storage txoptions ( #435 )
2020-04-17 12:57:57 +03:00
Alex Snast
d6d95dd363
entc/gen: adding tx callback support ( #414 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-03-31 18:58:10 +03:00
Ariel Mashraki
d9c8d9545d
entc/gen: use NotFoundError when updating non-exist node ( #348 )
...
Fixes #341
2020-02-16 13:26:13 +02:00
Alex Snast
e6ba06441b
entc/gen: change <E>Err signature to <E>OrErr ( #325 )
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-01-30 18:56:36 +02:00
Ariel Mashraki
9e760aae58
entc/gen: change <E>WithError signature to <E>Err ( #322 )
...
<E>WithError is too verbose and we like short names
2020-01-30 11:12:53 +02:00
Ariel Mashraki
27935a8c6c
entc/gen: add <E>Loaded for <T>Edges ( #319 )
...
This helps to determine if the edge was loaded (or requested) in
eager-loading even if it's empty.
2020-01-29 11:39:19 +02:00
aca
3ee6223e64
entc/gen: use empty slice instead of nil in sqlAll ( #310 )
2020-01-23 16:16:21 +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
b54007ef56
Entc/enums ( #271 )
...
* ent: add default value setter to enum builder
Co-authored-by: Dario Ielardi <dario.ielardi@gmail.com >
2020-01-05 18:31:35 +02:00
Ariel Mashraki
7fde9b7642
entc/gen: move sql-update-one to sqlgraph
2019-12-22 13:32:51 +02:00
Ariel Mashraki
798d58f02b
all: use more go-ish error for constraint failures
2019-12-17 23:17:55 +02:00
Ariel Mashraki
802e3b583a
entc/integration: run tests with migrate options
2019-12-15 15:03:24 +02:00
Ariel Mashraki
e85b10be36
entc/gen: remove multi storage support
2019-12-15 14:48:55 +02:00
Ariel Mashraki
0fb33aaa5e
dialect/sql/sqlgraph: add update node api
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/222
Reviewed By: alexsn
Differential Revision: D18833733
fbshipit-source-id: e833d84f4e5e5c73b1c85e7387472c9a87b7947e
2019-12-08 21:59:53 -08:00
Ariel Mashraki
53cfcb6e8b
dialect/sql: fix predicate builder on join
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/143
Reviewed By: idoshveki
Differential Revision: D18346652
fbshipit-source-id: e8c5d7eb3cefc16f52090de0d121e82cae058fc2
2019-11-06 05:21:26 -08:00
Hylke Visser
02bae0d652
Remove update validators for immutable fields ( #137 )
...
Summary:
This pull request modifies the update builder template so that it no longer generates code to validate immutable fields.
The first commit breaks the integration code by making the `number` field of `Card` immutable (the generated validation code references non-existent fields of `CardUpdate`/`CardUpdateOne`).
The second commit fixes the issue by making the `update/save` template not render validation code for immutable fields.
Pull Request resolved: https://github.com/facebookincubator/ent/pull/137
Differential Revision: D18288633
Pulled By: a8m
fbshipit-source-id: c0361b833a3971f76280d624f16cd7eda2725c1e
2019-11-02 09:05:08 -07:00