Skip to content

Commit 81ce903

Browse files
committed
improvement: add AshPostgres.Tsvector
1 parent b35f8c7 commit 81ce903

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/types/tsvector.ex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
defmodule AshPostgres.Tsvector do
2+
@moduledoc """
3+
A thin wrapper around `:string` for working with tsvector types in calculations.
4+
5+
A calculation of this type cannot be selected, but may be used in calculations.
6+
"""
7+
8+
use Ash.Type.NewType, subtype_of: :term
9+
10+
@impl true
11+
def storage_type(_), do: :tsvector
12+
end

0 commit comments

Comments
 (0)