A TypeScript ORM for ClickHouse databases, providing type-safe model definitions, a powerful query builder, and migration support. Current stable version is 1.0.29. Released actively with regular updates. Key differentiators include full TypeScript-first approach, connection pooling, multi-tenancy support, and a built-in migration CLI. Unlike simpler ClickHouse clients, it offers a Django-like ORM experience with automatic type inference and advanced query operators.
npm install thunder-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a User model with name and age fields, then queries all users from the database using the default connection.
Update your package.json dependency from 'clickhouse-orm' to 'thunder-schema' and change imports accordingly.
Call ConnectionManager.init(config) before creating any model instances, or pass configuration to the model constructor.
Always use 'new' when defining fields in the schema object.
Upgrade Node.js to version 18.17.1 or later.
Replace IntField with NumberField in your model definitions.
Run 'npm install thunder-schema' and ensure Node.js >=18.17.1.
Change 'import Model from "thunder-schema"' to 'import { Model } from "thunder-schema"'.Call 'ConnectionManager.init({ host, port, username, password })' before using models.Use 'new StringField()' instead of 'StringField()' or a plain object.