pub enum PgBinOper {
Show 17 variants
ILike,
NotILike,
Matches,
Contains,
Contained,
Concatenate,
Overlap,
Similarity,
WordSimilarity,
StrictWordSimilarity,
SimilarityDistance,
WordSimilarityDistance,
StrictWordSimilarityDistance,
GetJsonField,
CastJsonField,
Regex,
RegexCaseInsensitive,
}Expand description
The binary operators only PostgreSQL has; BinOper holds them alongside the
standard ones.
The pg_trgm ones need that extension installed
(https://www.postgresql.org/docs/current/pgtrgm.html).
Variants§
ILike
ILIKE:
LIKE ignoring case.
NotILike
NOT ILIKE:
NOT LIKE ignoring case.
Matches
@@:
a tsvector matches a tsquery (full-text search).
Contains
@>:
the left array or jsonb value contains the right one.
Contained
<@:
the left array or jsonb value is contained in the right one.
Concatenate
||:
joins two strings, arrays or jsonb values.
Overlap
&&:
the two arrays share an element.
Similarity
%:
the strings’ trigram similarity passes the threshold (pg_trgm).
WordSimilarity
<%:
the left string’s word similarity to the right one passes the threshold
(pg_trgm).
StrictWordSimilarity
<<%:
as WordSimilarity, but counting whole words only (pg_trgm).
SimilarityDistance
<->:
one minus the strings’ similarity (pg_trgm).
WordSimilarityDistance
<<->:
one minus their word similarity (pg_trgm).
StrictWordSimilarityDistance
<<<->:
one minus their strict word similarity (pg_trgm).
GetJsonField
->:
a JSON object member or array element, as JSON.
CastJsonField
->>:
a JSON object member or array element, as text.
Regex
~:
matches a POSIX regular expression, case-sensitively.
RegexCaseInsensitive
~*:
matches a POSIX regular expression, ignoring case.