mobilizon.chapril.org-mobil.../lib/mobilizon/storage/custom_functions.ex

11 lines
297 B
Elixir
Raw Normal View History

defmodule Mobilizon.Storage.CustomFunctions do
@moduledoc """
Helper module for custom PostgreSQL functions
"""
defmacro split_part(string, delimiter, position) do
quote do
fragment("split_part(?, ?, ?)", unquote(string), unquote(delimiter), unquote(position))
end
end
end