It uses the actual database to get types, so for the flat regular rows it handles them very well, regardless of how complicated the query is (since it’s the db that can tell you what the return types of a query row will be). What it doesn’t handle well (or at all occasionally) is producing types from returned JSON structures, like with json_build_object etc. But the new lib I’m working on will handle (most) of that as well, thanks to Typesql (which is super cool).
↧
Binding to Postgres.js — sharing experience
↧