I like to use arrays of tuples to get related items in a single query
e.g. something like
select
id,
name,
array(select (child_id, dob) from children where cats.id = children.parent_id) as children
from cats
Minimal query:
select array(
select (1, 'a') union
select (2, 'b') union
select (3, 'c')
) as tuple_array;
p.s. I'm willing to help implement if you point me in the right direction 🐱
I like to use arrays of tuples to get related items in a single query
e.g. something like
Minimal query:
p.s. I'm willing to help implement if you point me in the right direction 🐱