KyselyK
Kysely3y ago
13 replies
Daniel Cruz

Coalesce return empty array

Hey is there a way to return an empty array rather than
null
when an array column is empty?

I already tried
.select(coalesce("categories",sql`ARRAY[]::"CollectionCategory"[]`).as("categories"))


but it's still returning null and not an empty array
Was this page helpful?