ormDB + Sequelize
What This Adapter Will Do
ormDB is a relational database engine written in Rust that replaces PostgreSQL, MySQL, and SQLite as the actual database underneath your application. The planned @ormdb/sequelize-adapter package will connect Sequelize’s model system and association layer to ormDB, letting you keep your existing model definitions and eager loading patterns while the database resolves object graphs natively.
Sequelize’s include option on findAll and findOne tells the ORM which associated models to load. With a SQL database, Sequelize generates complex JOIN queries or issues multiple SELECT statements. The ormDB adapter will translate these into native graph-fetch requests, resolving the entire association tree in a single round-trip and eliminating N+1 queries.
Planned Setup
The adapter will follow the same pattern as other ormDB ORM adapters:
npm install @ormdb/sequelize-adapter
import { Sequelize } from 'sequelize'
import { OrmDBDialect } from '@ormdb/sequelize-adapter'
const sequelize = new Sequelize({
dialect: OrmDBDialect,
host: process.env.ORMDB_HOST,
port: Number(process.env.ORMDB_PORT),
database: process.env.ORMDB_DATABASE,
})
Your existing models and queries will work unchanged:
const users = await User.findAll({
include: [
{
model: Post,
include: [Comment, Tag],
},
],
})
What Will Change, What Will Stay
Stays the same: Model definitions (define), associations (hasMany, belongsTo, belongsToMany, hasOne), finders (findAll, findOne, findByPk), eager loading via include, scopes, and hooks.
Changes: The database engine. Nested include trees become single-round-trip graph fetches. Migrations gain A-D safety grading. Vector search, geo search, full-text search, and change streams become available natively.
Removed: Raw SQL via sequelize.query() and Sequelize.literal(). All queries must use Sequelize’s model-based API.
Get Notified
The Sequelize adapter is planned. To track development progress or register interest, visit the ormDB GitHub repository and join the community discussion.
Frequently Asked Questions
When will the Sequelize adapter be available?
The Sequelize adapter is on the ormDB roadmap. Development priority is driven by community demand. Join the ormDB Discord or GitHub discussions to signal interest and track progress.
Will my existing Sequelize models work with ormDB?
The planned adapter will support standard Sequelize model definitions, associations (hasMany, belongsTo, belongsToMany), and eager loading via the include option. No changes to your model files will be required.
Will Sequelize's include option benefit from ormDB?
Yes. Sequelize's include option maps directly to ormDB's graph-fetch queries. Instead of generating multiple SQL JOINs or subqueries, ormDB will resolve the entire nested include tree in a single round-trip.
What about raw queries in Sequelize?
Raw SQL queries via sequelize.query() will not be supported because ormDB does not use SQL. Applications relying on raw queries will need to refactor those calls to use Sequelize's model API.
Can I start building with ormDB now and add Sequelize later?
Yes. You can use ormDB directly today and add the Sequelize adapter when it becomes available. Alternatively, consider using one of the available beta adapters for [Prisma](/integrations/prisma), [Drizzle](/integrations/drizzle), or [TypeORM](/integrations/typeorm).