A Sequelize-like ORM for ClickHouse database, version 1.0.8, with TypeScript support, connection management, model definitions, fluent query builder, and relationship handling (hasMany, belongsTo, hasOne). Built specifically for ClickHouse's columnar architecture. Released as an npm package with no major release cadence yet. Key differentiators: familiar Sequelize-like API tailored for ClickHouse, supports automatic table creation and migrations, and optimized for ClickHouse performance.
npm install chouse-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes ORM, defines a model with ClickHouse engine, synces table, creates and queries records.
Install both packages: npm install chouse-orm @clickhouse/client
Use require() instead of import, or use a bundler that handles CJS.
Use orm.DataTypes after instantiating ORM, e.g., orm.define('Model', { field: { type: orm.DataTypes.String } })Use recreate or insert operations instead; check documentation for upserts.
Always include engine and orderBy in model options, e.g., { engine: 'MergeTree()', orderBy: 'id' }npm install @clickhouse/client
Access DataTypes via the ORM instance: const orm = new ClickHouseORM(...); then orm.DataTypes.UInt32
Ensure you instantiate ORM correctly and call orm.authenticate() as an async function.
Add engine and orderBy options: orm.define('Model', {...}, { engine: 'MergeTree()', orderBy: 'id' })