It sometimes makes sense to inline your queries instead of collecting them in separate SQL files.
PgTyped supports inlined queries using the
sql template literal.
To see how that works lets write some queries in
PgTyped parses your TS files, scanning them for
sql queries and generating corresponding TS interfaces in
We can now pass the
ISelectUserIdsQuery as a generic parameter to our query in
For more information on writing queries in TS files checkout the SQL-in-TS guide.