postgrelize / plainToTsQuery
Function: plainToTsQuery() ​
plainToTsQuery(
text,config?):Fn
Defined in: src/expressions/search-helpers.ts:111
postgrelize extensionplainto_tsquery([config,] text): ANDs all words of plain text. 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]: plainToTsQuery('fat cats', 'english') } } });