SQL library for the Stackpress framework (v0.10.5), primarily used with Node.js and TypeScript. It provides a simple query builder and database abstraction layer, supporting multiple dialects (PostgreSQL, MySQL, SQLite). Active development, frequent releases. Heavier than alternatives like Knex but integrated with the Stackpress ecosystem for CLI, migrations, and seeders.
npm install stackpress-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an in-memory SQLite connection, runs a simple query, and closes the connection.
Replace `connection.queryRaw('SELECT 1')` with `connection.query(sql\`SELECT 1\`)`.Use `await connection.close()` instead of passing a callback.
Always import `sql` exactly as `sql` (lowercase).
Explicitly call `await connection.close()` when done.
Use `createConnection({ type: 'postgres', pool: true })` to enable pooling.Use ESM import: `import { query } from 'stackpress-sql';` (not `connection.query`). Ensure `createConnection` returns a connection object with a `query` method.Set `"type": "module"` in package.json or use `.mjs` extension.
Change `import sql from 'stackpress-sql'` to `import { sql } from 'stackpress-sql'`.No dependency data recorded yet.