Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
2b93264
fix(types): broaden and & or typing
ephys Jan 27, 2022
483d2cb
fix(types): make Op types stricter
ephys Jan 27, 2022
0be61f3
test(types): disable tests that fail in TS 4.3
ephys Jan 28, 2022
700970a
Merge branch 'main' into ephys/fix-and-or-typing
ephys Jan 28, 2022
ea5539a
test: add typing test for or(val, op)
ephys Jan 31, 2022
f3c512e
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 7, 2022
2c1b90e
test: fix tests
ephys Feb 7, 2022
1a2ef82
fix: accept WhereAttributeHash in where
ephys Feb 7, 2022
ff0caa1
fix(types): fix ts losing info with or()/and()
ephys Feb 7, 2022
8b86e04
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 9, 2022
b70661c
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 9, 2022
d25959f
fix(types): fix WhereOperators based on new findings
ephys Feb 9, 2022
a888bb6
Merge branch 'ephys/fix-and-or-typing' of github.com:sequelize/sequel…
ephys Feb 9, 2022
b32d726
test(typings): remove invalid test
ephys Feb 9, 2022
f924da0
Merge branch 'main' into ephys/fix-and-or-typing
sdepold Feb 11, 2022
97bc8e5
test(types): start merging typing & unit tests for where
ephys Feb 21, 2022
e008f0c
fix(types): start supporting Op.{not,col,any,all}
ephys Feb 21, 2022
2b24040
test: add unit tests for Op.eq, Op.ne
ephys Feb 22, 2022
fe184b8
test: add unit tests for Op.is, Op.not
ephys Feb 22, 2022
e60a07f
test: add unit tests for Op.lt & similar
ephys Feb 22, 2022
26d6d5e
test: add tests for Op.like & similar
ephys Feb 22, 2022
37612f0
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 22, 2022
79e855a
refactor: add @types/lodash
ephys Feb 22, 2022
5598d80
refactor: replace commented out tests with .skip
ephys Feb 22, 2022
7b0e0df
refactor: move common unit tests to a helper
ephys Feb 22, 2022
1d80d09
test: add test for Op.all/any + Op.values
ephys Feb 22, 2022
3cdde31
test: add unit tests for between/notBetween
ephys Feb 22, 2022
28d5350
test: fix Op.between test
ephys Feb 22, 2022
d2ecb1a
test: remove duplicate tests from types/where.ts
ephys Feb 22, 2022
bf17d8c
test: add Op.in/Op.notIn unit tests
ephys Feb 22, 2022
e54aec4
test: add literal + ::casting test
ephys Feb 22, 2022
8ba101c
test: add Op.overlap/contain/contained unit tests
ephys Feb 22, 2022
f6c07c4
feat: improve WhereOptions typing
ephys Feb 22, 2022
6fc5836
fix(types): improve typing for Op.in
ephys Feb 22, 2022
d584049
fix: update endsWith/substring op typing&tests
ephys Feb 23, 2022
851adfa
fix(types): make where entry accept values & operator at the same time
ephys Feb 23, 2022
a202ac1
fix(types): add better support for Op.values, PG ranges
ephys Feb 23, 2022
dbfd68b
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 26, 2022
e7b3507
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 26, 2022
742a1fa
test: fix expectsql transforming ARRAY[x] into ARRAY"x"
ephys Feb 26, 2022
0a06af2
test: fix generated tester function name
ephys Feb 26, 2022
36ebf33
test: test array support in Op.in, Op.gt
ephys Feb 26, 2022
42688bd
test: test where generation against actual model & add array tests
ephys Feb 26, 2022
78b3289
fix(types): improve WhereOptions using attribute typing
ephys Feb 26, 2022
ccca820
Merge branch 'main' into ephys/fix-and-or-typing
ephys Feb 26, 2022
0c4c0f1
test: update common where tests
ephys Feb 27, 2022
b8aa152
fix(types): ensure implicit operator used on array attr is ≡ Op.eq
ephys Feb 27, 2022
7053ede
fix(types): support casting syntax
ephys Feb 27, 2022
290148e
test: add unit tests for Op.regexp & co
ephys Feb 27, 2022
7f941d1
feat: improve JSON typing support
ephys Feb 27, 2022
0b76775
test: ignore typing errors in `json()`
ephys Feb 27, 2022
0aa00ed
fix: remove Op.all/Op.any from Op.startsWith typings
ephys Feb 27, 2022
8d9e593
feat: support Op.any/Op.all in regexp & match
ephys Feb 27, 2022
39b44d5
test: add tests for where()
ephys Feb 27, 2022
e7bdfd1
refactor: cleanup typing
ephys Feb 27, 2022
f4dfe64
test: test Op.and,or ; + syntax combinations
ephys Feb 27, 2022
a130f26
feat(types): distinguish arrays from ranges in Op.overlap
ephys Feb 27, 2022
9651888
docs: document RANGE in TypeScript
ephys Feb 27, 2022
72df8f5
test: test 'ELEM Op.contained RANGE' + unbound ranges
ephys Feb 27, 2022
e04782d
fix(types): support ELEM Op.contained RANGE
ephys Feb 27, 2022
7db9bdf
fix(types): improve 'range OP range' types
ephys Feb 27, 2022
696f0e8
test: add new where & Op.col tests
ephys Feb 27, 2022
81335c4
fix: test Op.overlap with Op.any
ephys Feb 27, 2022
6bc3383
refactor: final cleanup
ephys Feb 27, 2022
07845c0
test: fix tests for non-pg dialects
ephys Feb 27, 2022
bf9689f
test: update test with sqlite, ibmi, snowflake, db2
ephys Feb 27, 2022
eddd8f0
Merge branch 'main' into ephys/fix-and-or-typing
ephys Mar 2, 2022
ef4af37
refactor: revert useless change in type tests
ephys Mar 13, 2022
13d3ffc
refactor: fix import style
ephys Mar 13, 2022
0c37eea
fix: revert previous revert
ephys Mar 13, 2022
c823958
Merge branch 'main' into ephys/fix-and-or-typing
WikiRik Mar 13, 2022
2b437cf
Merge branch 'main' into ephys/fix-and-or-typing
ephys Mar 14, 2022
464d8ae
test: add missing test
ephys Mar 14, 2022
a824ed2
test: add test for co-existing NOT/OR/AND & attrs
ephys Mar 14, 2022
5abe275
fix(types): distinguish when Array-as-AND can be used
ephys Mar 14, 2022
b2bb93a
Merge branch 'main' into ephys/fix-and-or-typing
ephys Mar 14, 2022
6133858
test: fix broken where test
ephys Mar 14, 2022
5118823
fix: improve where() typing & add tests
ephys Mar 15, 2022
609c0fe
test: add tests for json-path, attr-paths in col
ephys Mar 15, 2022
dedd4d2
Merge branch 'main' into ephys/fix-and-or-typing
ephys Mar 15, 2022
b26cbfe
test: test where(col('col'), { jsonPath: 'value' })
ephys Mar 15, 2022
4e3ae72
test: add test for where(literal, hash)
ephys Mar 15, 2022
b38832e
test: add test to ensure an invalid where throws
ephys Mar 15, 2022
0e3aafe
Merge branch 'main' into ephys/fix-and-or-typing
ephys Mar 17, 2022
6e1f9d2
Merge branch 'main' into ephys/fix-and-or-typing
ephys Mar 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
403 changes: 211 additions & 192 deletions docs/manual/other-topics/other-data-types.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/dialects/abstract/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ export type DialectSupports = {
GEOMETRY: boolean,
GEOGRAPHY: boolean,
REGEXP: boolean,
/**
* Case-insensitive regexp operator support ('~*' in postgres).
*/
IREGEXP: boolean,
HSTORE: boolean,
TSVECTOR: boolean,
deferrableConstraints: boolean,
Expand Down Expand Up @@ -167,6 +171,7 @@ export abstract class AbstractDialect {
RANGE: false,
GEOMETRY: false,
REGEXP: false,
IREGEXP: false,
GEOGRAPHY: false,
HSTORE: false,
TSVECTOR: false,
Expand Down
1 change: 1 addition & 0 deletions src/dialects/postgres/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class PostgresDialect extends AbstractDialect {
RANGE: true,
GEOMETRY: true,
REGEXP: true,
IREGEXP: true,
GEOGRAPHY: true,
JSON: true,
JSONB: true,
Expand Down
Loading