Ariel Mashraki
3fa749d9e3
dialect/sql: remove go1.12 support ( #457 )
2020-04-30 13:21:00 +03:00
Ariel Mashraki
2208b243db
dialect/sql/schema: initial work for incremental migration ( #428 )
...
This is a WIP PR and should be ignored this moment.
It's based on PR #221 created by Erik Hollensbe (He should
get his credit for his work before we land this).
2020-04-12 19:12:33 +03: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
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
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
ab732c7654
dialect/sql: add drop-fk command to builder
2019-12-31 21:26:02 +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
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
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
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
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
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
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
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
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
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
Ariel Mashraki
c3955a08f1
schema/field: json type support ( #38 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/38
Only `IsNil` and `NotNil` predicates are supported this moment
Reviewed By: alexsn
Differential Revision: D17444976
fbshipit-source-id: 37336fa0bc7749af995933baee2e23bb7366dd78
2019-09-19 05:00:11 -07:00
Ariel Mashraki
b067d5d8b4
dialect/sql: increment and decrement columns using "add"
...
Summary:
Use case:
```
query, args := Update("data_packs").
Add("bytes_left", count).
Where(expr...).
Query()
```
Reviewed By: alexsn
Differential Revision: D17257590
fbshipit-source-id: f27b4b388a711a16deb0c3b790e24957e044204d
2019-09-09 05:50:59 -07:00
Ariel Mashraki
9ab0a28ffe
entc/select: add selection api
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/27
Reviewed By: alexsn
Differential Revision: D17164536
fbshipit-source-id: f5caa80b05aff1ef8ec30d7a53256b00380d018c
2019-09-04 07:14:24 -07:00
Alex Snast
373769dfaf
ent/gen: adding EqualFold predicate for string fields
...
Summary: Similar to `ContainsFold` predicate requires `--storage=sql` argument to be passed to entc.
Reviewed By: a8m
Differential Revision: D17074805
fbshipit-source-id: ced299154417fe2c9007cd6a7a504f53c8b2ef98
2019-08-27 10:48:53 -07:00
Ariel Mashraki
bd07c86b60
all: add license header to all go files
...
Summary:
Used addlicense to generate this:
addlicense -c "Facebook Inc" -f license_header .
example was taken from: https://github.com/facebook/litho/blob/master/lib/soloader/BUCK
Reviewed By: alexsn
Differential Revision: D17070152
fbshipit-source-id: e7b91398d7f6181727be3400c1872ad5f28e38ed
2019-08-27 04:48:28 -07:00
Ariel Mashraki
fb56e0c786
ent/dialect/sql: add ContainsFold to builder
...
Reviewed By: alexsn
Differential Revision: D16961184
fbshipit-source-id: f3f0c2bdd4950340ddebca929b8fed79256c7aeb
2019-08-22 04:38:15 -07:00
Ariel Mashraki
e2524ff0ad
ent/dialect/sql: add upper and lower methods
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/18
Reviewed By: elys1um
Differential Revision: D16916563
fbshipit-source-id: f758536103356cb5b2bacf707c7c7da931bb4560
2019-08-20 07:52:59 -07:00
Ariel Mashraki
e0e754717e
ent: change ent package name ( #1338 )
...
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1338
Pull Request resolved: https://github.com/facebookincubator/ent/pull/14
Reviewed By: alexsn
Differential Revision: D16890825
fbshipit-source-id: 656baaa73f5debab08c849b6b9639caeec2a8ef1
2019-08-19 09:32:14 -07:00
Ariel Mashraki
329b5ddf77
ent/sql/migrate: support indexes
...
Reviewed By: alexsn
Differential Revision: D16711184
fbshipit-source-id: 632b02c5c77c6289b242263647d45d9f28752e3f
2019-08-11 05:47:18 -07:00
Ariel Mashraki
8cb2428ea3
ent: fix lint errors
...
Reviewed By: idoshveki
Differential Revision: D16560151
fbshipit-source-id: 703f6e28403b14fc667fa7c592f0f3827a9335a6
2019-07-30 05:31:33 -07:00
Ariel Mashraki
dbe2afb946
add Clone methods for query builders ( #10 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/10
Closes T46957221
Reviewed By: idoshveki
Differential Revision: D16278371
fbshipit-source-id: ca2b038fccb8fca6a7e8261444de27bdd63d0b00
2019-07-16 03:32:25 -07:00
Ariel Mashraki
e8e96f014f
add charset support for fields
...
Summary: Basically, adding support for Hebrew characters.
Reviewed By: alexsn
Differential Revision: D16068537
fbshipit-source-id: 4e934da5ea97c9e804317f746556ab1d51faebcc
2019-07-01 08:10:24 -07:00
Ariel Mashraki
0e605681b2
quote table name on DESCRIBE statement ( #7 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/7
avoid conflicting with reserved words (e.g. "groups" became reserved word in MySQL 8.x)
Reviewed By: alexsn
Differential Revision: D15957279
fbshipit-source-id: b6944752c7e5f6ec37119b11cc0ab8a0d7d3a7ff
2019-06-23 01:51:28 -07:00
Ariel Mashraki
4f31aa6cfe
imporve sql migration ( #3 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/3
add an append-only mode to the migration
Reviewed By: alexsn
Differential Revision: D15845370
fbshipit-source-id: f22ae1866d4bb9250bf2d1c6cba476d574a3f45d
2019-06-17 04:23:24 -07:00
facebook-github-bot
267e3c15bd
Initial commit
...
fbshipit-source-id: c79a38536e3c128dce1b2948615b72ec9779ed22
2019-06-16 04:37:51 -07:00