Chaos ORM base classes for SQL adapters, version 19.0.2. Provides core abstractions for relational database operations including schema migration, query building, and result mapping. Integrates with Chaos ORM ecosystem for ActiveRecord or DataMapper patterns. Requires babel-polyfill as a peer dependency. Supports MySQL, PostgreSQL, SQLite through adapter packages. Release cadence is irregular; major version jumps indicate breaking changes. Differentiator from Sequelize/Knex: tighter integration with Chaos ORM's event-driven architecture.
npm install chaos-databaseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows instantiating a Database with a MySQL adapter, connecting, and running a raw query.
Pass adapter directly to Database constructor instead of calling setAdapter() after instantiation.
Use Schema.migrate() explicitly to apply changes.
Create an adapter instance (e.g., from 'chaos-mysql') and pass it to the constructor.
Install babel-polyfill alongside chaos-database.
Use import { Database } from 'chaos-database' instead of import Database from 'chaos-database'.Pass an adapter instance to the Database constructor.