mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-19 21:13:19 +12:00
chore: fix error expression
This commit is contained in:
parent
407a7163ed
commit
ac980a2163
5 changed files with 7 additions and 7 deletions
|
@ -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,
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
|
@ -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
|
||||||
}
|
}
|
Loading…
Reference in a new issue