Ariel Mashraki
8effe6dfeb
dialect/sql/schema: remove code-duplication from sqlite test ( #425 )
2020-04-07 11:03:44 +03:00
Ariel Mashraki
6824259b80
dialect/sql/schema: remove code-duplication from pg test ( #422 )
2020-04-06 15:44:21 +03:00
Ariel Mashraki
3c03ed00a8
dialect/sql/schema: more code de-duplication from mysql test ( #421 )
2020-04-06 12:31:54 +03:00
Ariel Mashraki
ff26e5ff7d
dialect/sql/schema: remove code-duplication from mysql test ( #420 )
2020-04-06 12:00:44 +03:00
Ariel Mashraki
b1eb999097
dialect/sql/schema: comment changes ( #415 )
2020-03-31 22:51:50 +03:00
Ariel Mashraki
a6e5124d13
dialect/sql/schema: better error message for sqlite limitation ( #401 )
2020-03-22 22:04:00 +02: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
320b9caf61
dialect/sql/schema: add option to skip fixture when it's irrelevant ( #350 )
2020-02-16 18:17:58 +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
ab71992b7c
dialect/sql/mysql: fix verifyrange check for mysql ( #337 )
2020-02-09 16:09:02 +02:00
Ariel Mashraki
26440c2bc9
dialect/sql/schema: setrange on custom column name of pks ( #333 )
2020-02-09 09:41:26 +02:00
qystishere
374b5dd3b8
dialect/sql/schema: support mysql latest numeric type format ( #328 )
2020-02-08 15:37:35 +02:00
Ariel Mashraki
c0c0d2ae5c
dialect/sql/schema: verify and fix mysql auto-increment on reset ( #329 )
2020-02-06 19:36:23 +02:00
Ariel Mashraki
b4255998bf
entc/gen: change name format for edge fks ( #286 )
...
* entc/gen: change name format for edge fks
* dialect/sql/schema: add fixture support for mysql and postgres
* sql/dialect: merge fkcolumn queries to one for the 2 dialects
2020-02-03 15:41:55 +02:00
Ariel Mashraki
cb5b9f6f9e
dialect/sql: add drop/add-index for older version of mysql ( #315 )
...
Add support for MySQL 5.6.35
2020-01-23 20:25:48 +02:00
Ariel Mashraki
6819c01906
dialect/sql: allow nil values for exec commands ( #313 )
...
In most cases, the sql.Result is not needed.
2020-01-22 22:43:45 +02:00
Ariel Mashraki
3425754c8e
dialect/sql/schema: scan multi-column indexes with their correct position ( #308 )
2020-01-22 04:43:01 -05:00
Ariel Mashraki
fd8c07717c
dialect/sql: add change-column for mysql ( #304 )
...
Old versions of MySQL (<8) do not support the 'RENAME' caluse
2020-01-21 05:04:01 -05:00
Ariel Mashraki
4c89190e8a
dialect/sql: add alter-index for renaming psql indexes ( #301 )
2020-01-20 18:13:55 -05:00
Ariel Mashraki
ba189b5f33
dialect/sql: add rename-index to mysql builder ( #300 )
2020-01-20 12:53:04 -05:00
Ariel Mashraki
91c163525f
dialect/sql/schema: correctly read uint32 type in migration ( #289 )
...
Fixes #287
2020-01-15 17:46:16 +02:00
Ariel Mashraki
cd366c07e2
dialect/sqlscan: add tests for nulltype scanning ( #278 )
2020-01-12 11:02:05 +02:00
Ariel Mashraki
b93958ebf4
dialect/sql/sqlgraph: add query edges function ( #274 )
2020-01-07 19:50:33 +02:00
Christoph Hartmann
46982d2f05
dialect/sql: add predicates for composite where query ( #264 )
...
* add predicates for composite where query
Signed-off-by: Christoph Hartmann <chris@lollyrock.com >
* use existing table.Columns method
* simplify the composite operator methods
2020-01-02 18:42:26 +02:00
Ariel Mashraki
7fc3689027
dialect/sql/schema: add prepare option to mysql dialect
2020-01-01 19:11:20 +02:00
Ariel Mashraki
ab732c7654
dialect/sql: add drop-fk command to builder
2019-12-31 21:26:02 +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
Ariel Mashraki
6bb834612c
dialect/sql/schema: drop unique constraint on pg migration
...
Fixes #235
2019-12-15 18:52:05 +02:00
Ariel Mashraki
58486009c2
dialect/sql/schema: keep the original name of pg index
2019-12-15 16:47:46 +02:00
Ariel Mashraki
25fe5b8f4a
dialect/sql/schema: correctly check pg unique constraint
2019-12-15 16:41:28 +02:00
Ariel Mashraki
fb4e1b6234
dialect/sql/sqlgraph: add tests for nodes count
2019-12-12 17:22:36 +02:00
Ariel Mashraki
26ccecdf6d
dialect/sql/sqlgraph: add initial work for nodes-count
2019-12-12 17:14:34 +02:00
Ariel Mashraki
4ab244cf93
dialect/sql/sqlgraph: first work on nodes querying
2019-12-12 12:56:31 +02:00
Ariel Mashraki
9f324ce030
dialect/sql/sqlgraph: delete nodes in the graph
2019-12-11 15:39:20 +02:00
Ariel Mashraki
429e331b32
dialect/sql/sqlgraph: add edge tests for nodes update
2019-12-11 14:41:27 +02:00
Ariel Mashraki
876e454d1e
dialect/sql/sqlgraph: add rest of edges to update-nodes
2019-12-10 21:22:09 +02:00
Ariel Mashraki
f86e39f179
dialect/sql/sqlgraph: update nodes using predicate
...
Currently, only fields and own-FK.
Next PR will edge types: M2M, O2M and O2O (non-inverse).
2019-12-10 17:17:35 +02:00
Ariel Mashraki
f65cf5150e
dialect/sqlscan: add interface{} scanning support
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/223
Reviewed By: alexsn
Differential Revision: D18878581
fbshipit-source-id: 4a60ceea6c092f065e52e6b3bb625487451a815d
2019-12-08 21:59:53 -08: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
bb051603ac
dialect/sqlgraph: add edges in node creation ( #216 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/216
WIP - ignore for now
Reviewed By: alexsn
Differential Revision: D18795361
fbshipit-source-id: d3a4ef5562be5faf0837cad6364130ec203a9d37
2019-12-04 09:44:50 -08:00
Ariel Mashraki
a5e4a9cf54
dialect/sqlscan: add ScanInt64 to be used by sqlgraph
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/213
Reviewed By: alexsn
Differential Revision: D18763694
fbshipit-source-id: 890b35fcc2a28914b276ce65477788b4ddaeebf9
2019-12-03 01:44:48 -08:00
Ariel Mashraki
a4fac2db3b
dialect/sqlgraph: initial work for create-node api ( #211 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/211
Move out the logic from the Go templates to Go code.
Next diff will add the edges of the node.
Reviewed By: alexsn
Differential Revision: D18762049
fbshipit-source-id: c9a93672415a26a6f4a7d466e569b8b0e8b0f9ee
2019-12-02 08:12:13 -08:00
Ariel Mashraki
0f4fc12cc5
dialect/sql: support recursive pointer types
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/210
Reviewed By: alexsn
Differential Revision: D18757642
fbshipit-source-id: 6dec318f68e2f14f1c7ffdf2dcd185be130b2f77
2019-12-01 05:54:52 -08:00
Ariel Mashraki
80dab06a57
dialect/sql: match column scan with sql tag
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/209
Reviewed By: alexsn
Differential Revision: D18757390
fbshipit-source-id: 534a8404a06487d90f1f4f10b1f93c774bac2e97
2019-12-01 03:21:38 -08:00
Ariel Mashraki
f98dbbc440
dialect/sql/schema: remove Go 1.13 string features
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/207
Reviewed By: xjtian
Differential Revision: D18743529
fbshipit-source-id: f6420e9ca233e0ce6f9254b4f85d1711ee4d4bfa
2019-11-28 03:16:55 -08:00