ash_postgres/lib/functions/trigram_similarity.ex
Zach Daniel 80e63f9067 feat: support fragments
feat: support type casting

feat: update to latest ash to support expressions
2021-01-22 16:47:24 -05:00

15 lines
464 B
Elixir

defmodule AshPostgres.Functions.TrigramSimilarity do
@moduledoc """
See the postgres docs on [https://www.postgresql.org/docs/9.6/pgtrgm.html](trigram) for more information.
Requires the pg_trgm extension. Configure which extensions you have installed in your `AshPostgres.Repo`
# Example
filter(query, trigram_similarity(name, "geoff") > 0.4)
"""
use Ash.Query.Function, name: :trigram_similarity
def args, do: [:string, :string]
end