This interface is the type of the Op object.

This type cannot be used directly, use Op instead.

interface OpTypes {
    adjacent: typeof adjacent;
    all: typeof all;
    allKeysExist: typeof allKeysExist;
    and: typeof and;
    any: typeof any;
    anyKeyExists: typeof anyKeyExists;
    between: typeof between;
    col: typeof col;
    contained: typeof contained;
    contains: typeof contains;
    endsWith: typeof endsWith;
    eq: typeof eq;
    gt: typeof gt;
    gte: typeof gte;
    iLike: typeof iLike;
    iRegexp: typeof iRegexp;
    in: typeof in;
    is: typeof is;
    isNot: typeof isNot;
    like: typeof like;
    lt: typeof lt;
    lte: typeof lte;
    match: typeof match;
    ne: typeof ne;
    noExtendLeft: typeof noExtendLeft;
    noExtendRight: typeof noExtendRight;
    not: typeof not;
    notBetween: typeof notBetween;
    notEndsWith: typeof notEndsWith;
    notILike: typeof notILike;
    notIRegexp: typeof notIRegexp;
    notIn: typeof notIn;
    notLike: typeof notLike;
    notRegexp: typeof notRegexp;
    notStartsWith: typeof notStartsWith;
    notSubstring: typeof notSubstring;
    or: typeof or;
    overlap: typeof overlap;
    regexp: typeof regexp;
    startsWith: typeof startsWith;
    strictLeft: typeof strictLeft;
    strictRight: typeof strictRight;
    substring: typeof substring;
    values: typeof values;
}

Properties

adjacent: typeof adjacent

Operator -|- (PG range is adjacent to operator)

[Op.adjacent]: [1, 2]

In SQL

-|- [1, 2)
all: typeof all

Operator ALL

[Op.gt]: {
[Op.all]: literal('SELECT 1')
}

In SQL

> ALL (SELECT 1)
allKeysExist: typeof allKeysExist

Operator ?&

[Op.allKeysExist]: ['a', 'b']

In SQL

?& ARRAY['a', 'b']
and: typeof and

Operator AND

[Op.and]: {a: 5}

In SQL

AND (a = 5)
any: typeof any

Operator ANY ARRAY (PG only)

[Op.any]: [2,3]

In SQL

ANY (ARRAY[2, 3]::INTEGER[])

Operator LIKE ANY ARRAY (also works for iLike and notLike)

[Op.like]: { [Op.any]: ['cat', 'hat']}

In SQL

LIKE ANY (ARRAY['cat', 'hat'])
anyKeyExists: typeof anyKeyExists

Operator ?|

[Op.anyKeyExists]: ['a', 'b']

In SQL

?| ARRAY['a', 'b']
between: typeof between

Operator BETWEEN

[Op.between]: [6, 10]

In SQL

BETWEEN 6 AND 10
col: typeof col

With dialect specific column identifiers (PG in this example)

[Op.col]: 'user.organization_id'

In SQL

= "user"."organization_id"
contained: typeof contained

Operator <@ (PG array contained by operator)

[Op.contained]: [1, 2]

In SQL

<@ [1, 2)
contains: typeof contains

Operator @> (PG array contains operator)

[Op.contains]: [1, 2]

In SQL

@> [1, 2)
endsWith: typeof endsWith

Operator LIKE

[Op.endsWith]: 'hat'

In SQL

LIKE '%hat'
eq: typeof eq

Operator =

[Op.eq]: 3

In SQL

= 3
gt: typeof gt

Operator >

[Op.gt]: 6

In SQL

> 6
gte: typeof gte

Operator >=

[Op.gte]: 6

In SQL

>= 6
iLike: typeof iLike

Operator ILIKE (case insensitive) (PG only)

[Op.iLike]: '%hat'

In SQL

ILIKE '%hat'
iRegexp: typeof iRegexp

Operator ~* (PG only)

[Op.iRegexp]: '^[h|a|t]'

In SQL

~* '^[h|a|t]'
in: typeof in

Operator IN

[Op.in]: [1, 2]

In SQL

IN [1, 2]
is: typeof is

Operator IS

[Op.is]: null

In SQL

IS null
isNot: typeof isNot

Operator IS NOT

[Op.isNot]: null

In SQL

IS NOT null
like: typeof like

Operator LIKE

[Op.like]: '%hat'

In SQL

LIKE '%hat'
lt: typeof lt

Operator <

[Op.lt]: 10

In SQL

< 10
lte: typeof lte

Operator <=

[Op.lte]: 10

In SQL

<= 10
match: typeof match

Operator @@

[Op.match]: Sequelize.fn('to_tsquery', 'fat & rat')`

In SQL

@@ to_tsquery('fat & rat')
ne: typeof ne

Operator !=

[Op.ne]: 20

In SQL

!= 20
noExtendLeft: typeof noExtendLeft

Operator &> (PG range does not extend to the left of operator)

[Op.noExtendLeft]: [1, 2]

In SQL

&> [1, 2)
noExtendRight: typeof noExtendRight

Operator &< (PG range does not extend to the right of operator)

[Op.noExtendRight]: [1, 2]

In SQL

&< [1, 2)
not: typeof not

Operator NOT

[Op.not]: true

In SQL

IS NOT TRUE
notBetween: typeof notBetween

Operator NOT BETWEEN

[Op.notBetween]: [11, 15]

In SQL

NOT BETWEEN 11 AND 15
notEndsWith: typeof notEndsWith

Operator NOT LIKE

[Op.notEndsWith]: 'hat'

In SQL

NOT LIKE '%hat'
notILike: typeof notILike

Operator NOT ILIKE (case insensitive) (PG only)

[Op.notILike]: '%hat'

In SQL

NOT ILIKE '%hat'
notIRegexp: typeof notIRegexp

Operator !~* (PG only)

[Op.notIRegexp]: '^[h|a|t]'

In SQL

!~* '^[h|a|t]'
notIn: typeof notIn

Operator NOT IN

[Op.notIn]: [1, 2]

In SQL

NOT IN [1, 2]
notLike: typeof notLike

Operator NOT LIKE

[Op.notLike]: '%hat'

In SQL

NOT LIKE '%hat'
notRegexp: typeof notRegexp

Operator NOT REGEXP (MySQL/PG only)

[Op.notRegexp]: '^[h|a|t]'

In SQL

NOT REGEXP/!~ '^[h|a|t]'
notStartsWith: typeof notStartsWith

Operator NOT LIKE

[Op.notStartsWith]: 'hat'

In SQL

NOT LIKE 'hat%'
notSubstring: typeof notSubstring

Operator LIKE

[Op.notSubstring]: 'hat'

In SQL

NOT LIKE '%hat%'
or: typeof or

Operator OR

[Op.or]: [{a: 5}, {a: 6}]

In SQL

(a = 5 OR a = 6)
overlap: typeof overlap

Operator && (PG array overlap operator)

[Op.overlap]: [1, 2]

In SQL

&& [1, 2)
regexp: typeof regexp

Operator REGEXP (MySQL/PG only)

[Op.regexp]: '^[h|a|t]'

In SQL

REGEXP/~ '^[h|a|t]'
startsWith: typeof startsWith

Operator LIKE

[Op.startsWith]: 'hat'

In SQL

LIKE 'hat%'
strictLeft: typeof strictLeft

Operator << (PG range strictly left of operator)

[Op.strictLeft]: [1, 2]

In SQL

<< [1, 2)
strictRight: typeof strictRight

Operator >> (PG range strictly right of operator)

[Op.strictRight]: [1, 2]

In SQL

>> [1, 2)
substring: typeof substring

Operator LIKE

[Op.substring]: 'hat'

In SQL

LIKE '%hat%'
values: typeof values

Operator VALUES

[Op.values]: [4, 5, 6]

In SQL

VALUES (4), (5), (6)