Synclets logoSynclets

sql

The sql template tag constructs a Sql object from a template string.

sql(
  templateStrings: TemplateStringsArray,
  expressions: any[],
): Sql
TypeDescription
templateStringsTemplateStringsArray
expressionsany[]
returnsSql

This template literal tag function provides a convenient syntax for building parameterized SQL queries. It automatically handles parameter substitution and escaping, preventing SQL injection vulnerabilities.

Example: sqlSELECT * FROM ${table} WHERE id = ${id}.

This is used internally by database connectors for safe query construction.

Since

v0.0.0