Skip to content

Commit 6130b05

Browse files
authored
Support arrays using JSON in MyXQL for MariaDB (#668)
1 parent 6fabc93 commit 6130b05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ecto/adapters/myxql.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ defmodule Ecto.Adapters.MyXQL do
159159
## Custom MySQL types
160160

161161
@impl true
162+
def loaders({:array, _}, type), do: [&json_decode/1, type]
162163
def loaders({:map, _}, type), do: [&json_decode/1, &Ecto.Type.embedded_load(type, &1, :json)]
163164
def loaders(:map, type), do: [&json_decode/1, type]
164165
def loaders(:float, type), do: [&float_decode/1, type]

0 commit comments

Comments
 (0)