From d6bb54a961e0c6b6c2c1b3fe77aee699d02a2bec Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Mon, 2 Dec 2024 13:11:27 -0500 Subject: [PATCH] chore: remove raised error --- lib/sql_implementation.ex | 4 ---- lib/types/ltree.ex | 12 ++++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/sql_implementation.ex b/lib/sql_implementation.ex index c5a13c0d..ae4f863d 100644 --- a/lib/sql_implementation.ex +++ b/lib/sql_implementation.ex @@ -239,10 +239,6 @@ defmodule AshPostgres.SqlImplementation do do: nil def parameterized_type(type, constraints, no_maps?) do - if type == :array do - raise "WHAT" - end - if Ash.Type.ash_type?(type) do cast_in_query? = if function_exported?(Ash.Type, :cast_in_query?, 2) do diff --git a/lib/types/ltree.ex b/lib/types/ltree.ex index 0d6ad79e..512758e2 100644 --- a/lib/types/ltree.ex +++ b/lib/types/ltree.ex @@ -5,15 +5,15 @@ defmodule AshPostgres.Ltree do doc: """ Escape the ltree segments to make it possible to include characters that are either `.` (the separation character) or any other unsupported - character like `-` (Postgres <= 15). - + character like `-` (Postgres <= 15). + If the option is enabled, any characters besides `[0-9a-zA-Z]` will be - replaced with `_[HEX Ascii Code]`. - + replaced with `_[HEX Ascii Code]`. + Additionally the type will no longer take strings as user input since it's impossible to decide between `.` being a separator or part of a - segment. - + segment. + If the option is disabled, any string will be relayed directly to postgres. If the segments are provided as a list, they can't contain `.` since postgres would split the segment.