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
Ariel Mashraki
5610d0ade9
dialect/sqlgraph: fix neighbors check with predicates
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/206
Reviewed By: alexsn
Differential Revision: D18729641
fbshipit-source-id: a5d333132ae276691ac8c1b084bc5d2037112529
2019-11-27 23:50:00 -08:00
Ariel Mashraki
29c7b0a0d8
dialect/sql: remove Go1.13 specific features
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/205
Reviewed By: alexsn
Differential Revision: D18742422
fbshipit-source-id: 1e1996fe26787788e4c0466a58884b4fa0581353
2019-11-27 23:14:24 -08:00
Ariel Mashraki
6fe565f059
dialect/sqlgraph: add builder with functional options for neighbors steps
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/199
Reviewed By: alexsn
Differential Revision: D18707950
fbshipit-source-id: 77e5308dc4f984306c131d8541cbbd60d82a1488
2019-11-26 12:42:47 -08:00
Ariel Mashraki
413bbad8d8
dialect/sqlgraph: fix M2O relation in neighbors-with check
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/198
Reviewed By: alexsn
Differential Revision: D18707741
fbshipit-source-id: 69dd010e27ee07ffe44acc12003b9772220aaa2a
2019-11-26 12:42:47 -08:00
Ariel Mashraki
be307dab3c
dialect/sql: type alias txoptions
...
Reviewed By: alexsn
Differential Revision: D18689199
fbshipit-source-id: 7606a3a24beb286d464b64eb2e51a1257fbffdcd
2019-11-25 10:13:59 -08:00
Ariel Mashraki
1bf83dd65f
dialect/sql: add BeginTx for sql driver
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/193
Reviewed By: dlvhdr
Differential Revision: D18685934
fbshipit-source-id: abc4bf0b14ece3827bc20ecb864e7ca0594c2759
2019-11-25 07:29:52 -08:00
Ariel Mashraki
d2fb1b5548
dialect/sql: override RETURNING clause on postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/192
Reviewed By: dlvhdr
Differential Revision: D18685852
fbshipit-source-id: 90ddd1057a7d6cfa00470a7b11fb237862edcc2b
2019-11-25 07:29:52 -08:00
Ariel Mashraki
038dc2899a
dialect/sqlgraph: test and fix M2M neighbors check
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/190
Reviewed By: alexsn
Differential Revision: D18680440
fbshipit-source-id: b2dce0ee3e0a898fab901c4287c6c1c1844e51d6
2019-11-24 22:34:28 -08:00
Ariel Mashraki
7fb6238d18
dialect/sql: add hasneighborswith for predicates
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/185
Reviewed By: alexsn
Differential Revision: D18661688
fbshipit-source-id: 4c60fa5e81372f10bfecf4f166b048784bc515ee
2019-11-24 07:11:22 -08:00
Ariel Mashraki
0fc310e600
sql/dialect/schema: ignore foreign-keys in index dropping
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/188
Reviewed By: alexsn
Differential Revision: D18676877
fbshipit-source-id: 0babe457edadfa46dcbc7c7478d4468c48f84361
2019-11-24 05:32:22 -08:00
Ariel Mashraki
2543d90167
dialect/sql: add hasneigbors for predicates ( #184 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/184
This diff is part of the ongoing effort for moving the sql logic out from codegen.
Reviewed By: alexsn
Differential Revision: D18656817
fbshipit-source-id: 71001d37eb78032414c2f83f200d3011b50c114b
2019-11-24 04:16:36 -08:00
Ariel Mashraki
c355ed49be
entc/gen: move set-neighbors logic from codegen to sqlgraph
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/183
Reviewed By: alexsn
Differential Revision: D18644179
fbshipit-source-id: 2f2b0c03811a09c4c11240e5161187afbb2ac553
2019-11-24 04:16:36 -08:00
Ariel Mashraki
e54373f410
ent: allow non-numeric columns as PKs
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/180
Reviewed By: alexsn
Differential Revision: D18636443
fbshipit-source-id: f14b34926817f6d9652f49a640bfb377f3f3cdaf
2019-11-21 08:49:58 -08:00
Ariel Mashraki
703a6dd039
dialect/sql/schema: mysql support for uuid type
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/176
Reviewed By: alexsn
Differential Revision: D18615992
fbshipit-source-id: 2c86a661e8d75165470b9b2d351cb973147290d8
2019-11-20 09:49:55 -08:00
Ariel Mashraki
f7dac21972
dialect/sql/schema: sqlite support for uuid type
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/177
Reviewed By: alexsn
Differential Revision: D18615595
fbshipit-source-id: b3167a0aa9260cdf22d88dd7e45c7ebfae1909d5
2019-11-20 09:49:55 -08:00
Ariel Mashraki
db7b05ad04
dialect/sql/schema: postgres support for uuid type
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/178
Reviewed By: alexsn
Differential Revision: D18615561
fbshipit-source-id: 8244189186bf35d78cfdb991ee4f8cecd6411cee
2019-11-20 09:49:54 -08:00
Ariel Mashraki
d31f0828f0
dialect/sql: replace nulltime with official implementation on 1.13 and higher
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/169
Reviewed By: alexsn
Differential Revision: D18561431
fbshipit-source-id: d21335c073e0abed99d97c85c03cfa17c8326fef
2019-11-17 09:06:58 -08:00
Ariel Mashraki
54b1a2ead9
sql/dialect/schema: accept old blob types in mysql ( #164 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/164
support varbinary as blob types
Reviewed By: yhayun
Differential Revision: D18504189
fbshipit-source-id: e3c8fcf412d1f6374b0084b439eee426b24b3466
2019-11-14 06:37:17 -08:00
Ariel Mashraki
6ce4cb6803
all: fix minor lint errors
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/159
Reviewed By: dlvhdr
Differential Revision: D18476131
fbshipit-source-id: 9e792f5a35f25233aad73f75f12d13d215a21ad2
2019-11-13 06:01:41 -08:00
Ariel Mashraki
aece79f8a8
dialect/sql: add option for getting the neighbors of set of vertices ( #157 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/157
It should be used by the query builders for stepping to neighbors of the matches.
Reviewed By: alexsn
Differential Revision: D18448517
fbshipit-source-id: bf3aeea8c90a4e9b090e9298a20600b8f0b5ace3
2019-11-12 10:37:23 -08:00
Ariel Mashraki
73e294a21e
dialect/sql: reduce the number of joins on neighbors without predicates ( #154 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/154
Loading the "form" table is not required where there's no predicate on the join.
Reviewed By: alexsn
Differential Revision: D18421062
fbshipit-source-id: cb2a045a5a8a76ea4f07e5cf4305a6da338a616e
2019-11-10 21:51:32 -08:00
Ariel Mashraki
0ff49fe89f
dialect/sql: add neighbors test for O2O with 2 types
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/146
Reviewed By: idoshveki
Differential Revision: D18369884
fbshipit-source-id: 8cba47de27831d317dbe438ccff49b61132f6085
2019-11-07 02:42:35 -08:00
Ariel Mashraki
6eb14bba9f
dialect/sql: add O2O tests for graph neighbors
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/145
Reviewed By: naor9991
Differential Revision: D18354409
fbshipit-source-id: 0327443cfb8cae6c2136cf6acc4057a17d0e3e0c
2019-11-06 23:54:31 -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
Ariel Mashraki
7a6d1ce9dc
dialect/sql: add tests for graph neighbors function
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/141
Reviewed By: naor9991
Differential Revision: D18333780
fbshipit-source-id: 920f1c77182ee2a5cbd942d6c9cceec448b9900b
2019-11-05 22:50:16 -08:00
Ariel Mashraki
930a17b767
dialect/sql: add neighbors function ( #140 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/140
This part of the effort of moving logic from Go templates to shared packages.
Next diffs will migrate the neighbors-set and predicates as well.
Dedicated tests for `sql/dialect/graph.go` will be added in a follow-up diff.
Reviewed By: alexsn
Differential Revision: D18304531
fbshipit-source-id: 93e9cf2636b5b4525eb27305bd2708122cfd6e40
2019-11-05 13:08:48 -08:00
Ariel Mashraki
c259aee24b
entc/gen: generate sql builders with dialect option
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/130
Reviewed By: alexsn
Differential Revision: D18164397
fbshipit-source-id: 2858d69d3ff85c06b51382c01c3d4369ee2c3bdb
2019-10-27 21:53:50 -07:00
Ariel Mashraki
ea479ea527
dialect/sql/schema: move SQLite logic to its own file
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/129
Reviewed By: alexsn
Differential Revision: D18164329
fbshipit-source-id: 79abfc76389fcf7fe1b88f2dd6e69600ab7f3af2
2019-10-27 08:59:08 -07:00
Ariel Mashraki
23cbf325c0
dialect/sql/schema: move MySQL logic to its own file
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/128
Reviewed By: alexsn
Differential Revision: D18164283
fbshipit-source-id: da6b4d6df89ae4172d8f47a7790c4dac3a8ffe93
2019-10-27 08:59:08 -07:00
Ariel Mashraki
d5c111b35a
dialect/sql/schema: univerdal id support for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/122
Reviewed By: alexsn
Differential Revision: D18113754
fbshipit-source-id: 1050f0c2b823db6ba1bc37c36f6749cfcffa982d
2019-10-24 08:45:09 -07:00
Ariel Mashraki
7f598f34a2
dialect/sql/schema: fix constraint symbol size for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/121
Reviewed By: alexsn
Differential Revision: D18113304
fbshipit-source-id: 80d4c65323eb2613fbb9ab47754b1e70b42b1b15
2019-10-24 08:45:09 -07:00
Ariel Mashraki
88bfbc38df
dialect/sql/schema: index builders per dialect
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/118
Reviewed By: alexsn
Differential Revision: D18092371
fbshipit-source-id: 02b85724b1e00d10c930112b9e2c8d07c8727216
2019-10-24 02:23:33 -07:00
Ariel Mashraki
c414cd9a82
dialect/sql/schema: alter column for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/117
Reviewed By: alexsn
Differential Revision: D18083914
fbshipit-source-id: a5f6993cfe9a260a84c0d4ab868e3e797b3a5776
2019-10-23 05:39:17 -07:00
Ariel Mashraki
a0c7ee77dc
dialect/sql/schema: default value format support for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/116
Reviewed By: alexsn
Differential Revision: D18083400
fbshipit-source-id: 5939aa2d1819d991ae74adc81c4ac60455bb7ed0
2019-10-23 05:39:16 -07:00
Ariel Mashraki
2789257849
dialect/sql/schema: alter table for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/115
Reviewed By: alexsn
Differential Revision: D18065988
fbshipit-source-id: a7d33bbebd63b01659bc5ba562ac85642dcd3d83
2019-10-22 12:55:36 -07:00
Ariel Mashraki
dff3067639
dialect/sql/schema: table creation tests for postgres
...
Reviewed By: alexsn
Differential Revision: D18059272
fbshipit-source-id: f93785378119dfa18be31fdfc969848ea6d9b782
2019-10-22 08:17:05 -07:00
Ariel Mashraki
8be31d18f9
dialect/sql/schema: add postgres table and column builders
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/114
Reviewed By: alexsn
Differential Revision: D18059082
fbshipit-source-id: fffec25143fa5f2a0ed2c79787abacefad724862
2019-10-22 08:17:05 -07:00
Ariel Mashraki
8e3a17550a
sql/dialect/schema: add sqltype for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/108
Reviewed By: alexsn
Differential Revision: D18032062
fbshipit-source-id: 04a1d65bf4bd6bb78d79f1312ea09cce25cbb901
2019-10-20 08:30:13 -07:00
Ariel Mashraki
5f4a55ea1e
sql/dialect/schema: load postgres table
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/107
Reviewed By: alexsn
Differential Revision: D18031837
fbshipit-source-id: 863f8db50a0547a7cb5e9ac560066fd6ee4e9c26
2019-10-20 05:20:16 -07:00
Ariel Mashraki
c3135d03a6
ent/dialect/sql/schema: set nullability of columns on scan
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/106
Reviewed By: alexsn
Differential Revision: D17987588
fbshipit-source-id: f5f985d28bdd7379826dca35111c61f1c169d5c0
2019-10-17 14:29:32 -07:00
Ariel Mashraki
0241a969b4
diaelct/sql/schema: postgres read columns
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/104
Reviewed By: alexsn
Differential Revision: D17980080
fbshipit-source-id: 341092a17798d008b91389263bf3bdc24b2571b2
2019-10-17 09:11:12 -07:00
Ariel Mashraki
2b6c8eada3
dialect/sql/schema: initial interface for postgres API
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/101
Reviewed By: alexsn
Differential Revision: D17977541
fbshipit-source-id: 118f935e11449661fd91f87b94dde2fb62c9b912
2019-10-17 05:50:49 -07:00
Ariel Mashraki
a6df15101f
dialect/sql: fix bad query generation on clone
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/97
Reviewed By: alexsn
Differential Revision: D17931134
fbshipit-source-id: e181e253f6e29b757f5ca647195d87d7ac89a0c8
2019-10-15 13:38:39 -07:00
Ariel Mashraki
6f5f42ab3c
dialect/sql: dialect based builders ( #1550 )
...
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1550
Pull Request resolved: https://github.com/facebookincubator/ent/pull/84
This is still WIP and you should ignore this.
Reviewed By: alexsn
Differential Revision: D17854477
fbshipit-source-id: 2d19713c118adb31164b7a2781327e64c87db8d4
2019-10-13 07:03:11 -07:00
Alex Snast
9983309eac
ent/circleci: cache / restore go modules ( #86 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/86
In addition rename run.deadline golangci-lint config to run.timeout
Reviewed By: a8m
Differential Revision: D17863321
fbshipit-source-id: f863bac6499ddd3066a3ec6e9f518c0d5156f117
2019-10-12 23:52:42 -07:00
Alex Snast
ce2bc07c1a
ent/circleci: adding linter tests
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/80
Reviewed By: a8m
Differential Revision: D17837182
fbshipit-source-id: 9fb539fd6cebc064d2d2804bd52e0fbf413cfc93
2019-10-10 04:45:07 -07:00
Alex Snast
ac50ea81d4
ent: address several lint errors throughout the project ( #1534 )
...
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1534
Pull Request resolved: https://github.com/facebookincubator/ent/pull/73
lint errors detected by running `golangci-lint` tool.
Reviewed By: a8m
Differential Revision: D17784980
fbshipit-source-id: f7e8bd99fdf1e018d5672cea1e8d44b67f2a4201
2019-10-06 23:59:12 -07:00