Minimal ORM supporting MySQL, PostgreSQL, and SQLite with full SQL query support. Version 0.7.1 is the latest stable release (no recent updates). Based on node-sql query builder and node-anydb connection pool. Key differentiator: allows arbitrary SQL while providing table definition and relationship helpers like selectDeep for nested results. Supports both callback and promise patterns. No TypeScript types shipped in vs 0.7.1.
npm install anydb-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize anydb-sql, define a table, and run a simple get query with promises.
Migrate to Knex.js or Sequelize.
Write custom .d.ts or use @types/anydb-sql (if exists).
Set pool options during initialization.
Run npm install anydb-sql and ensure correct import path.
Provide a connection string like 'postgres://user:pass@host/db'.
Use const db = anydbsql({...}) not const db = require('anydb-sql').