SQL adapter for JSData ORM supporting PostgreSQL, MySQL, MariaDB, SQLite3, Oracle, and MSSQL. Current stable version 1.0.1. Requires knex as a peer dependency plus a specific database driver (e.g., pg, sqlite3, mysql). Differentiates from other ORMs by integrating tightly with JSData's schema-based data store, offering a unified API across multiple SQL dialects. Release cadence is low; this is a mature, stable package.
npm install js-data-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Quickstart showing SqlAdapter usage with in-memory SQLite, registering adapter, defining mapper, creating and querying records.
Upgrade js-data to version 3 or later, or use an older js-data-sql version.
Install knex@>=0.13.0 alongside js-data-sql.
If you need active maintenance, evaluate alternatives like TypeORM, Prisma, or Sequelize.
Install one of: pg, sqlite3, mysql, mysql2, mariasql, strong-oracle, oracle, mssql
Run: npm install knex
Set knexOpts.client to one of: 'pg', 'mysql', 'sqlite3', etc.
Use import instead of require: import { DataStore } from 'js-data';Add useNullAsDefault: true to knexOpts when using sqlite3 client.