* Execute a single SQL statement like with PGlite.query, but with a * templated statement where template values will be treated as parameters. * * You can use helpers from `/template` to further format the query with * identifiers, raw SQL, and nested statements. * * This u
(
sqlStrings: TemplateStringsArray,
...params: any[]
)
| 177 | * ``` |
| 178 | */ |
| 179 | async sql<T>( |
| 180 | sqlStrings: TemplateStringsArray, |
| 181 | ...params: any[] |
| 182 | ): Promise<Results<T>> { |
| 183 | const { query, params: actualParams } = queryTemplate(sqlStrings, ...params) |
| 184 | return await this.query(query, actualParams) |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * Execute a SQL query, this can have multiple statements. |