ak4zh
03/02/2022, 6:23 AMquery.ilike('columnOne|columnTwo|columnThree', '%' + searchTerm + '%')
silentworks
03/02/2022, 8:49 AM.ilike()
, otherwise create a function inside Postgres and use .rpc
to handle your search.YelloJello
03/02/2022, 6:17 PMjs
select('*, foreign_table!table_alias:f_key_1 (prop1, prop2)').or('prop1.ilike.%somevalue%, prop2.ilike.%somevalue%', { foreignTable: 'foreign_table' })
Would yield inaccurate results, IMO almost always doesn't filter.
While the equivalent SQL filters the table properly:
sql
SELECT * FROM primary_table INNER JOIN foreign_table ON primary_table.f_key = foreign_table.id WHERE prop1 ILIKE '%somevalue%' OR prop2 ILIKE '%somevalue%'
EDIT: Moved to a new thread #948648279128834098ak4zh
03/02/2022, 6:58 PMto_tsquery
and to_vector
it works perfect. Supabase does not support this use case directly via client.YelloJello
03/02/2022, 7:00 PMEXPLAIN
liberally