I've working in adding support for full text search in top of PostgreSQL but I'm stuck (would like to share it as a plugin, maybe extending it to others DB - as Mysql which support textual search):
First, I created a "Tsvector" type for search columns[1]. Although I can save values in the database, they are saved as basic tsvector (as a "values"::tsvector cast).
The correct approach would define column value with a function call: to_tsvector('values')
But if I rewrite $value to that in Tsvector::toStatement, it did escaped and saved in DB as "to_tsvector('".
Theres currently a way to define a field value as result of a SQL call function?
Maybe allowing using a Query->func()->to_tsquery('values') ?