Skip to content

Commit 5324d0a

Browse files
committed
refactor: Turns the enums into a JSON array (rather than a PG array)
1 parent b9551ff commit 5324d0a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/lib/sql/types/list.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ t.typname AS name,
44
n.nspname as schema,
55
pg_catalog.Format_type ( t.oid, NULL ) AS format,
66
pg_catalog.obj_description ( t.oid, 'pg_type' ) AS description,
7-
array (
7+
array_to_json(array (
88
select e.enumlabel
99
FROM pg_catalog.pg_enum e
1010
WHERE e.enumtypid = t.oid
1111
ORDER BY e.oid
12-
) AS enums
12+
)) AS enums
1313
FROM pg_catalog.pg_type t LEFT JOIN pg_catalog.pg_namespace n
1414
ON n.oid = t.typnamespace
1515
WHERE (

src/lib/sql/types/list.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ t.typname AS name,
44
n.nspname as schema,
55
pg_catalog.Format_type ( t.oid, NULL ) AS format,
66
pg_catalog.obj_description ( t.oid, 'pg_type' ) AS description,
7-
array (
7+
array_to_json(array (
88
select e.enumlabel
99
FROM pg_catalog.pg_enum e
1010
WHERE e.enumtypid = t.oid
1111
ORDER BY e.oid
12-
) AS enums
12+
)) AS enums
1313
FROM pg_catalog.pg_type t LEFT JOIN pg_catalog.pg_namespace n
1414
ON n.oid = t.typnamespace
1515
WHERE (

0 commit comments

Comments
 (0)