Fix ParadeDB fuzzy query parameter casting
Cast the bound search parameter through text before so Postgrex can handle the prepared statement type inference. Add matching test assertion updates.
This commit is contained in:
parent
7efd296afb
commit
4e65bbf134
2 changed files with 2 additions and 2 deletions
|
|
@ -235,7 +235,7 @@ defmodule Pleroma.Search.ParadeDB do
|
|||
end
|
||||
|
||||
defp search_query_param_sql(0), do: "$1"
|
||||
defp search_query_param_sql(distance), do: "$1::pdb.fuzzy(#{distance})"
|
||||
defp search_query_param_sql(distance), do: "($1::text)::pdb.fuzzy(#{distance})"
|
||||
|
||||
defp create_table_sql(table) do
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue