Is there a way to coalesce without having to redefine the inferred type ?

I have this select
users: sql`COALESCE(${usersSubquery.users}, '[]'::jsonb[])`
users: sql`COALESCE(${usersSubquery.users}, '[]'::jsonb[])`
And I'd really like to keep the type inferred from usersSubquery.users. Is there a way to not loose the type ?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?