SQL database adapter for the Offshore ORM, providing support for MySQL, PostgreSQL, and SQLite. Current stable version is 1.0.9. Release cadence is irregular, with infrequent updates. Key differentiator: bridges Offshore's query language to SQL backends, but note that Offshore itself is a less common ORM compared to alternatives like Sequelize or Knex. Requires offshore core as peer dependency. ESM-only from v1.0.0.
npm install offshore-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Offshore ORM with the SQL adapter, defines a model, and queries all users.
Use import statements instead of require().
Use offshore's migrate or sync methods after initializing.
Upgrade MySQL to version 8 or later.
Access the underlying knex instance via adapter.knex to run transactions.
Run 'npm install offshore-sql' and ensure your package.json has 'type': 'module' or use .mjs extension.
Replace require('offshore-sql') with import adapter from 'offshore-sql'.Verify DB_HOST, port, and that the database service is started.