@gcu/sql
v0.1.0
Published
SQL language tag with syntax highlighting and completions. Zero-dep tagged-template helper used by Auditable and usable standalone.
Downloads
69
Maintainers
Readme
@gcu/sql
SQL language tag with syntax highlighting and completions for Auditable and anywhere else you want a sql tagged template helper.
Pre-1.0 — APIs may break on minor version bumps.
Install
npm install @gcu/sqlUsage
import { sql } from '@gcu/sql';
const tableName = 'users';
const query = sql`SELECT * FROM ${tableName} WHERE id = 1`;sql is a tagged template that returns { raw, values } — parameterize with your own executor. tokenizeSql and sqlCompletions are also exported for editor integration.
License
MIT.
