@@ -23,16 +23,16 @@ defmodule AshPostgres.SqlImplementation do
23
23
nil
24
24
25
25
{ :array , type } ->
26
- parameterized_type ( { :array , Ash.Type . get_type ( type ) } , [ ] , false )
26
+ parameterized_type ( { :array , Ash.Type . get_type ( type ) } , [ ] )
27
27
28
28
{ :array , type , constraints } ->
29
- parameterized_type ( { :array , Ash.Type . get_type ( type ) } , constraints , false )
29
+ parameterized_type ( { :array , Ash.Type . get_type ( type ) } , constraints )
30
30
31
31
{ type , constraints } ->
32
- parameterized_type ( type , constraints , false )
32
+ parameterized_type ( type , constraints )
33
33
34
34
type ->
35
- parameterized_type ( type , [ ] , false )
35
+ parameterized_type ( type , [ ] )
36
36
end
37
37
end
38
38
@@ -241,22 +241,20 @@ defmodule AshPostgres.SqlImplementation do
241
241
end
242
242
243
243
@ impl true
244
- def parameterized_type ( type , constraints , no_maps? \\ true )
245
-
246
- def parameterized_type ( { :parameterized , _ } = type , _ , _ ) do
244
+ def parameterized_type ( { :parameterized , _ } = type , _ ) do
247
245
type
248
246
end
249
247
250
- def parameterized_type ( { :parameterized , _ , _ } = type , _ , _ ) do
248
+ def parameterized_type ( { :parameterized , _ , _ } = type , _ ) do
251
249
type
252
250
end
253
251
254
- def parameterized_type ( { :in , type } , constraints , no_maps? ) do
255
- parameterized_type ( { :array , type } , constraints , no_maps? )
252
+ def parameterized_type ( { :in , type } , constraints ) do
253
+ parameterized_type ( { :array , type } , constraints )
256
254
end
257
255
258
- def parameterized_type ( { :array , type } , constraints , _ ) do
259
- case parameterized_type ( type , constraints [ :items ] || [ ] , false ) do
256
+ def parameterized_type ( { :array , type } , constraints ) do
257
+ case parameterized_type ( type , constraints [ :items ] || [ ] ) do
260
258
nil ->
261
259
nil
262
260
@@ -265,31 +263,23 @@ defmodule AshPostgres.SqlImplementation do
265
263
end
266
264
end
267
265
268
- def parameterized_type ( { type , constraints } , [ ] , no_maps? ) do
269
- parameterized_type ( type , constraints , no_maps? )
266
+ def parameterized_type ( { type , constraints } , [ ] ) do
267
+ parameterized_type ( type , constraints )
270
268
end
271
269
272
- def parameterized_type ( Ash.Type.CiString , constraints , no_maps? ) do
273
- parameterized_type ( AshPostgres.Type.CiStringWrapper , constraints , no_maps? )
270
+ def parameterized_type ( Ash.Type.CiString , constraints ) do
271
+ parameterized_type ( AshPostgres.Type.CiStringWrapper , constraints )
274
272
end
275
273
276
- def parameterized_type ( Ash.Type.String , constraints , no_maps? ) do
277
- parameterized_type ( AshPostgres.Type.StringWrapper , constraints , no_maps? )
274
+ def parameterized_type ( Ash.Type.String , constraints ) do
275
+ parameterized_type ( AshPostgres.Type.StringWrapper , constraints )
278
276
end
279
277
280
- def parameterized_type ( :tsquery , constraints , no_maps? ) do
281
- parameterized_type ( AshPostgres.Tsquery , constraints , no_maps? )
278
+ def parameterized_type ( :tsquery , constraints ) do
279
+ parameterized_type ( AshPostgres.Tsquery , constraints )
282
280
end
283
281
284
- def parameterized_type ( type , _constraints , false )
285
- when type in [ Ash.Type.Map , Ash.Type.Map.EctoType ] ,
286
- do: :map
287
-
288
- def parameterized_type ( type , _constraints , true )
289
- when type in [ Ash.Type.Map , Ash.Type.Map.EctoType ] ,
290
- do: nil
291
-
292
- def parameterized_type ( type , constraints , no_maps? ) do
282
+ def parameterized_type ( type , constraints ) do
293
283
if Ash.Type . ash_type? ( type ) do
294
284
cast_in_query? =
295
285
if function_exported? ( Ash.Type , :cast_in_query? , 2 ) do
@@ -301,7 +291,7 @@ defmodule AshPostgres.SqlImplementation do
301
291
if cast_in_query? do
302
292
type = Ash.Type . ecto_type ( type )
303
293
304
- parameterized_type ( type , constraints , no_maps? )
294
+ parameterized_type ( type , constraints )
305
295
else
306
296
nil
307
297
end
@@ -312,7 +302,7 @@ defmodule AshPostgres.SqlImplementation do
312
302
else
313
303
case type . type ( constraints || [ ] ) do
314
304
:ci_string ->
315
- parameterized_type ( AshPostgres.Type.CiStringWrapper , constraints , no_maps? )
305
+ parameterized_type ( AshPostgres.Type.CiStringWrapper , constraints )
316
306
317
307
_ ->
318
308
Ecto.ParameterizedType . init ( type , constraints || [ ] )
0 commit comments