Commit Graph

24 Commits

Author SHA1 Message Date
Ariel Mashraki
433609444c dialect/sql/sqljson: support for order by value and length (#3278) 2023-01-26 12:20:31 +02:00
Ronen Lubin
5d4f02620d dialect/sql/sqljson: add ValueIsNotNull predicate (#3058)
* dialect/sql: add json ValueIsNotNull predicate

* get rid of false positive dupl linter warning

* add json valueIsNotNull case to integration tests

* fix rejects
2022-11-02 11:18:15 +02:00
Ariel Mashraki
cf137c665a dialect/sql/sqljson: cast marshaled args as json (#3008) 2022-10-11 14:15:01 +03:00
Ronen Lubin
0eaa78f77d dialect/sql/sqljson: add option to evaluate json path inside a predicate (#2982)
* dialect/sql/sqljson: add option to evaluate json path inside a predicate

* add postgres test case
2022-10-02 15:56:15 +03:00
Ariel Mashraki
eb4ea68356 dialect/sql/sqljson: add dialect-aware Append function 2022-09-29 08:54:44 +03:00
Giau. Tran Minh
2cdb627c0d dialect/sql/sqljson: quote non-identifiers (#2910)
* dialect/sql: fixed invalid json path quote

* fix: fixed empty string

* fix: fixed lint issue

* Apply suggestions from code review

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* fix: added test to new case

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-09-07 14:49:11 +03:00
Abirdcfly
3b1b75b9d7 dialect/sql/sqljson: remove duplicate word in comments (#2892)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-30 10:19:04 +03:00
Ariel Mashraki
bedbea6665 dialct/sql/sqljson: fix HasKey implementation for SQLite (#2887) 2022-08-29 23:37:30 +03:00
Ariel Mashraki
79fe0ebcd6 sql/sqljson: add support for ValueIn/ValueNotIn (#2882) 2022-08-24 17:58:44 +03:00
Ariel Mashraki
2c63d1d70e all: gofmt -w -r 'interface{} -> any' (#2874) 2022-08-19 18:23:04 +03:00
Ariel Mashraki
77701d4db6 dialect/sql/sqljson: use the builtin string predciates in sqljson and improve tests 2021-11-16 10:07:34 +02:00
Ariel Mashraki
0dd7b0d7c3 dialect/sql/sqljson: fix sqlite haskey and add docs 2021-11-11 18:58:28 +02:00
Ariel Mashraki
3ba2b4e173 entc/integration/json: add tests for null literals 2021-11-10 17:24:51 +02:00
Ariel Mashraki
0c5398a11d dialect/sql/sqljson: support comparing values with null literal 2021-11-10 17:24:51 +02:00
Gerardo Reyes
f9e2609e95 dialect/sql: add pattern matching predicates for json values 2021-08-02 17:33:13 +02:00
WzyJerry
bbe54ede4e dialect/sql/sqljson: query in array of objects with Postgres backend #1594 (#1621) 2021-06-03 08:56:58 +03: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
9ea996593b dialect/sql/sqljson: initial work for json_contains predicate (#886) 2020-10-26 14:11:22 +02:00
Ariel Mashraki
2c0d7e5a42 dialect/sql/sqljson: add all predicates for length (#764) 2020-09-15 12:38:36 +03:00
Ariel Mashraki
3578d73a8f dialect/sql/sqljson: add length predicate (#763) 2020-09-15 11:53:54 +03:00
Ariel Mashraki
3cb7824561 json predicates (#760)
* dialect/sql/sqljson: cast postgres non-string values

* entc/integration: test json predicates
2020-09-14 12:37:57 +03:00
Ariel Mashraki
cbff065b51 dialect/sql/sqljson: add {lt,lte} to predicates (#757) 2020-09-13 16:12:37 +03:00
Ariel Mashraki
690e9cd402 dialect/sql/sqljson: add {neq,gt,gte} to predicates (#756) 2020-09-13 15:25:02 +03:00
Ariel Mashraki
ce48ab99b8 dialect/sql/sqljson: move json predicates to a package (#735) 2020-09-07 21:22:12 +03:00