sql
sql.identifier
sql.values
sql.raw
sql.default
toSQL
stream
chunked
.toSQL() prepares and prints you SQL query as { query: string, params: any[] }:
.toSQL()
{ query: string, params: any[] }
console.log(sql`select * from users`.toSQL()); console.log(sql`select * from users where id = ${10}`.toSQL());
{ query: "select * from users", params: [], } { query: "select * from users where id = $1", params: [ 10 ], }