Skip to content

Commit

Permalink
chore: fix error expression
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 15, 2023
1 parent 407a716 commit ac980a2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/expr.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ defmodule AshPostgres.Expr do
Contains,
DateAdd,
DateTimeAdd,
Error,
FromNow,
GetPath,
If,
Length,
Now,
Error,
StringJoin,
StringSplit,
Today,
Expand Down
2 changes: 1 addition & 1 deletion lib/migration_generator/ash_functions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
2 changes: 1 addition & 1 deletion test/error_expr_test.ex → test/error_expr_test.exs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test_snapshot_path/extensions.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"ash_functions_version": 1,
"installed": [
"ash-functions",
"uuid-ossp",
"pg_trgm",
"citext",
"demo-functions_v1"
]
],
"ash_functions_version": 2
}

0 comments on commit ac980a2

Please sign in to comment.