How to use the pg-sql2.compile function in pg-sql2

To help you get started, we’ve selected a few pg-sql2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graphile / graphile-engine / packages / graphile-build-pg / src / plugins / viaTemporaryTable.ts View on Github external
async function performQuery(pgClient: PoolClient, sqlQuery: SQLQuery) {
    // TODO: look into rowMode = 'array'
    const { text, values } = sql.compile(sqlQuery);
    if (debugSql.enabled) debugSql(text);
    return pgClient.query(text, values);
  }

pg-sql2

Generate safe Postgres-compliant SQL with tagged template literals

MIT
Latest version published 2 years ago

Package Health Score

66 / 100
Full package analysis