|
|
|
|
|
by jbaudanza
1832 days ago
|
|
I really like the idea of building TypeScript off of SQL types. But my ideal tool would be able to infer types from queries, not schemas. For example.. if I did: await db.query("SELECT user_id, COUNT(*) AS count FROM comments GROUP BY user_id");
I would like a TypeScript object that looks like: Array<{ user_id: number, count: number }>
|
|
and it also validates the types of the parameters that go into the query