postgrelize / phraseToTsQuery
Function: phraseToTsQuery() ​
phraseToTsQuery(
text,config?):Fn
Defined in: src/expressions/search-helpers.ts:127
postgrelize extensionphraseto_tsquery([config,] text): words of plain text that must follow each other. PostgreSQL extension.
Parameters ​
text ​
unknown
Plain text, bound as a parameter.
config? ​
string
Text search configuration; the server default when omitted.
Returns ​
Function call expression.
Throws ​
Error when config is not a plain or schema-qualified identifier.
Example ​
ts
await Post.findAll({ where: { search: { [Op.match]: phraseToTsQuery('fat cats', 'english') } } });