chore: fix error expression

This commit is contained in:
Zach Daniel 2023-12-15 08:48:20 -05:00
parent 407a7163ed
commit ac980a2163
5 changed files with 7 additions and 7 deletions

View file

@ -12,12 +12,12 @@ defmodule AshPostgres.Expr do
Contains, Contains,
DateAdd, DateAdd,
DateTimeAdd, DateTimeAdd,
Error,
FromNow, FromNow,
GetPath, GetPath,
If, If,
Length, Length,
Now, Now,
Error,
StringJoin, StringJoin,
StringSplit, StringSplit,
Today, Today,

View file

@ -147,7 +147,7 @@ defmodule AshPostgres.MigrationGenerator.AshFunctions do
\"\"\") \"\"\")
execute(\"\"\" execute(\"\"\"
CREATE OR REPLACE FUNCTION ash_raise_error(json_data json, type_signal ANYCOMPATIBLE) CREATE OR REPLACE FUNCTION ash_raise_error(json_data jsonb, type_signal ANYCOMPATIBLE)
RETURNS ANYCOMPATIBLE AS $$ RETURNS ANYCOMPATIBLE AS $$
BEGIN BEGIN
-- Raise an error with the provided JSON data. -- Raise an error with the provided JSON data.

View file

@ -21,7 +21,7 @@ defmodule AshPostgres.TestRepo.Migrations.InstallAshFunctionsExtension2 do
""") """)
execute(""" execute("""
CREATE OR REPLACE FUNCTION ash_raise_error(json_data json, type_signal ANYCOMPATIBLE) CREATE OR REPLACE FUNCTION ash_raise_error(json_data jsonb, type_signal ANYCOMPATIBLE)
RETURNS ANYCOMPATIBLE AS $$ RETURNS ANYCOMPATIBLE AS $$
BEGIN BEGIN
-- Raise an error with the provided JSON data. -- Raise an error with the provided JSON data.
@ -40,4 +40,4 @@ defmodule AshPostgres.TestRepo.Migrations.InstallAshFunctionsExtension2 do
"DROP FUNCTION IF EXISTS ash_raise_error(jsonb), ash_raise_error(jsonb, ANYCOMPATIBLE)" "DROP FUNCTION IF EXISTS ash_raise_error(jsonb), ash_raise_error(jsonb, ANYCOMPATIBLE)"
) )
end end
end end

View file

@ -1,6 +1,6 @@
defmodule AshPostgres.ErrorExprTest do defmodule AshPostgres.ErrorExprTest do
use AshPostgres.RepoCase, async: false use AshPostgres.RepoCase, async: false
alias AshPostgres.Test.{Api, Author, Comment, Post} alias AshPostgres.Test.{Api, Post}
require Ash.Query require Ash.Query
import Ash.Expr import Ash.Expr

View file

@ -1,10 +1,10 @@
{ {
"ash_functions_version": 1,
"installed": [ "installed": [
"ash-functions", "ash-functions",
"uuid-ossp", "uuid-ossp",
"pg_trgm", "pg_trgm",
"citext", "citext",
"demo-functions_v1" "demo-functions_v1"
] ],
"ash_functions_version": 2
} }