Custom queries
If you want to generate a custom query, write the query using raw sql in the folder specified on the typesql.config file.
Example:
Having the following query in select-products.sql
file.
TypeSQL will generate the types and function in the file select-products.ts. Then you can import the generate code and execute as following: