will/crystal-pg

Support for full text search

repomaa opened this issue · 2 comments

I noticed that trying to execute the following query fails with a syntax error:

db.query_all(
  "SELECT * FROM log_messages WHERE ts_message @@ websearch_to_tsquery(?)",
  to: MyModel,
  args: ["foo"]
)

# => Unhandled exception: syntax error at or near ")" (PQ::PQError)

Maybe ? must be $1? That's the syntax for placeholders in postgresql.

Yeah... sorry bout that :D