Ariel Mashraki
b8532f87a6
entc/gen: support for upsert with client generated ids
...
Fixed #1826
2021-08-14 17:44:04 +03:00
Ariel Mashraki
e71ccc6b6e
dialect/sql/sqlgraph: fix bug in entql predicate evaluation ( #1827 )
2021-08-11 21:03:52 +03:00
Ariel Mashraki
09c4306378
entc/gen: add support for upsert/on-conflict feature-flag
2021-08-04 14:01:31 +03:00
Ariel Mashraki
16c4b3379b
sqlgraph: change modifiers to onconflict options
2021-08-01 18:43:59 +03:00
Ariel Mashraki
7acf2234b6
dialect/sql/sqlgraph: allow setting stmt modifiers for create-many
2021-07-29 16:33:26 +03:00
Ariel Mashraki
b9fcbff724
dialect/sql/sqlgraph: allow setting stmt modifiers for create-one
2021-07-29 16:33:26 +03:00
Ariel Mashraki
279d6c2a12
dialect/sql/sqlgraph: add support for query modifiers
2021-07-20 13:14:39 +03:00
Ariel Mashraki
b46a6f0d69
dialect/sql/sqlgraph: prefix entql idents with table/select name ( #1592 )
2021-05-23 18:12:16 +03:00
Ariel Mashraki
edf473e043
dialect/sql: correct alias names for multiple join tables
2021-04-29 23:05:28 +03:00
Ariel Mashraki
712b6a5f08
dialect/sql/sqlgraph: allow update single node without select
2021-04-14 21:54:27 +03:00
Ariel Mashraki
56a0cf1e8b
dialect/sql/sqlgraph: fix incorrect arg-list handling in entql
...
Fixed #1376
2021-03-22 20:27:12 +02:00
Rotem Tamir
36e3492718
dialect/sql/sqlgraph: adding unit tests for IsConstraintError ( #1318 )
...
* dialect/sql/sqlgraph: adding unit tests for IsConstraintError group of checks in second phase of #1310
* renaming test for loop variable names
* use backtick strings to improve readability
2021-03-10 18:23:24 +02:00
Rotem Tamir
2a17dba983
dialect/sql/sqlgraph: add constraint error checks ( #1316 )
...
Initial work on #1310
2021-03-09 15:56:47 +02:00
Matthew Gabeler-Lee
c53b45ddb0
all: use %w instead of %v to wrap errors ( #1275 )
...
* all: use %w instead of %v for nested errors with fmt.Errorf
* all: update generated code to use %w instead of %v for error wrapping
2021-03-03 20:05:33 +02:00
Ariel Mashraki
8a8bfe7de6
dialect/sql/sqlgraph: skip setting last-insert-id if was provided ( #1291 )
...
Fixed #1290 . Issue in BulkCreate(<T>) for m2m edges
2021-03-02 11:59:20 +02:00
Ariel Mashraki
dd4792f5b3
go: rename module from github.com/facebook/ent => entgo.io/ent ( #1226 )
2021-02-02 23:03:04 +02:00
Ariel Mashraki
2c7228c23f
dialect/sql/sqlgraph: add schema for deletion command
2021-01-24 19:57:28 +02:00
Ariel Mashraki
aeb1ccc571
entc/gen: move schemaconfig template to feature-flag
2021-01-24 19:57:28 +02:00
Ariel Mashraki
f315801779
dialect/sql/sqlgraph: apply predicate on update-node
2021-01-22 23:04:09 +02:00
Marwan Sulaiman
3439ca207f
dialect/sql/sqlgraph: pass context.Context to *sql.Selector ( #1186 )
...
* Ensure sqlgraph passes the context to *sql.Selector
* Update dialect/sql/sqlgraph/graph_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/sqlgraph/graph_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* gofmt
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2021-01-18 19:41:59 +02:00
Marwan Sulaiman
13b61ff455
dialect/sql/sqlgraph: schema options for operations ( #1136 )
...
* Add schema options for sql graph
* PR Fixes
2021-01-12 09:29:01 +02:00
Ciaran Liedeman
4a1ac1eef1
dialect/sql/sqlgraph: allow arbitrary last insert id type ( #1104 )
2020-12-31 12:54:44 +02:00
Ariel Mashraki
da34571560
entc/gen: allow selecting specific fields ( #1075 )
2020-12-23 17:35:39 +02:00
Ariel Mashraki
43fa0ae9bc
dialect/sql/sqlgraph: skip empty updates ( #1043 )
2020-12-14 10:16:21 +02:00
Nathaniel Peiffer
42fa731f39
all: fix linting errors for comments ( #990 )
...
* fix: linting errors for comments
* fix: one more comment
2020-11-27 07:02:18 +02:00
Ariel Mashraki
ac8e8dac83
dialect/sql/sqlgraph: fix postgres lastinsert scanning for non-integer types ( #987 )
...
Fixed #985
2020-11-26 12:12:02 +02:00
Ariel Mashraki
e775227a11
dialect/sql/sqlgraph: avoid query on update when it's not needed ( #932 )
...
Closed #909
2020-11-10 10:01:40 +02:00
Ariel Mashraki
fae1956828
entql: add typed-builder for field predicates
2020-10-11 14:41:03 +03:00
Ariel Mashraki
16e804a788
entql: add experimental implementation for entql
2020-10-11 14:41:03 +03:00
Alex Snast
cd0a79e821
sql/builder: expand limit / offset into query instead of args ( #816 )
2020-10-04 13:13:56 +03:00
Ariel Mashraki
9743213860
dialect/sql/sqlgraph: catch selector errors before query execution
2020-09-10 22:53:25 +03:00
Ariel Mashraki
fc03257412
dialect/sql: add an option for clearing m2m edges ( #730 )
2020-09-06 17:27:31 +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
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
720766432a
dialect/sql/sqlgraph: initial work for batch insert ( #573 )
...
This is the first part for adding batch insert support for the framework.
The second part if the codegen.
2020-07-08 17:48:26 +03:00
Alex Snast
68db86be76
avoid multiple rows.Err calls on error path
...
Signed-off-by: Alex Snast <alexsn@fb.com >
2020-05-11 14:26:40 +03:00
Ciaran Liedeman
f59abad425
fix: checks for error after rows.Next call ( #480 )
2020-05-09 16:23:47 +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
d9c8d9545d
entc/gen: use NotFoundError when updating non-exist node ( #348 )
...
Fixes #341
2020-02-16 13:26:13 +02:00
Ariel Mashraki
b93958ebf4
dialect/sql/sqlgraph: add query edges function ( #274 )
2020-01-07 19:50:33 +02:00
Ariel Mashraki
c09028f58b
dialect/sql/sqlgraph: consistent scan names
2019-12-22 20:12:00 +02:00
Ariel Mashraki
a26b9626a6
entc/gen: move query-count to sqlgraph
2019-12-22 19:42:28 +02:00
Ariel Mashraki
d6d7ef565f
dialect/sql/sqlgraph: minor grammar changes
2019-12-22 15:36:03 +02:00
Ariel Mashraki
7fde9b7642
entc/gen: move sql-update-one to sqlgraph
2019-12-22 13:32:51 +02:00
Ariel Mashraki
c6800a3869
entc/gen: move node creation to sqlgraph
2019-12-17 22:45:04 +02:00
Ariel Mashraki
0cc74b5297
all: move sqlgraph to its own package
2019-12-17 18:26:09 +02:00