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,
DateAdd,
DateTimeAdd,
Error,
FromNow,
GetPath,
If,
Length,
Now,
Error,
StringJoin,
StringSplit,
Today,

View file

@ -147,7 +147,7 @@ defmodule AshPostgres.MigrationGenerator.AshFunctions do
\"\"\")
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 $$
BEGIN
-- Raise an error with the provided JSON data.

View file

@ -21,7 +21,7 @@ defmodule AshPostgres.TestRepo.Migrations.InstallAshFunctionsExtension2 do
""")
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 $$
BEGIN
-- 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)"
)
end
end
end

View file

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

View file

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