{"library":"sql-stamp","type":"library","category":null,"description":"sql-stamp is a tiny SQL templating library (v0.8.0) focused on simplicity and keeping SQL clean and readable. It supports conditional placeholders (`{=key, default}` for parameterized values, `{!key}` for raw values), ternary switches (`{?key, truthy, falsey}`), and file inclusion (`{>path}`). It automatically converts most placeholders to `?` for injection-safe parameterized queries. Unlike HTML template engines, it avoids loops and complex conditionals. Release cadence is low; last commit was 2019. Key differentiator: it outputs both SQL string and args array, integrating well with database drivers.","language":"javascript","status":"maintenance","version":"0.8.0","tags":["javascript","template","sql"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install sql-stamp","imports":["import sqlStamp from 'sql-stamp';","const tmpl = await sqlStamp(['./template.sql']); const result = tmpl('./template.sql', { key: 'val' });","const { sql, args } = tmpl('./query.sql', { id: 1 });"]},{"cmd":"yarn add sql-stamp","imports":[]},{"cmd":"pnpm add sql-stamp","imports":[]}],"homepage":"https://github.com/orangemug/sql-stamp#readme","github":"git://github.com/orangemug/sql-stamp","docs":null,"changelog":null,"pypi":null,"npm":"sql-stamp","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}