Reading
Bring related rows along
Put a relation's name in select, with the columns you want from it in parentheses.
select=name,owner(name)select=name,steps(*)select=name,owner(name,manager(name))A to-one relation, like a todo's owner, comes back as an object, or null when there is none. A to-many relation, like a todo's steps or its tags, comes back as an array, empty when there is nothing.
Relations are found from the foreign keys: todos.owner_id gives owner, and a table holding only two keys, like todo_tags, links todos and tags directly. relation(*) takes every visible column.
Embeds nest. By default a request may walk two relations deep; a third level answers too_deep.
Examples
/todos?select=name,owner(name),tags(name)Asking the database...
/users?select=name,todos(name,steps(title))Asking the database...
/steps?select=title,todo(name,owner(name))Asking the database...
/users?select=name,manager(name),users(name)Asking the database...
/todos?select=name,owner(name,manager(name,manager(name)))Asking the database...