Registry / database / scyllorm

scyllorm

JSON →
library0.0.9jsnpmunverified

Experimental TypeScript ORM for ScyllaDB (and theoretically Cassandra) using the Data Mapper pattern, inspired by TypeORM. Current version 0.0.9, pre-1.0 with limited features and no active release schedule. Key differentiators: native ScyllaDB support via DataStax Cassandra driver, decorator-based model definitions, and opinions about schema design. Alternatives like TypeORM or MikroORM lack ScyllaDB optimizations. Not production-ready; missing many features.

npm install scyllorm
INSTALL
IMPORT
SIG · SCYLLORM
S
scyllorm
databasejavascriptv0.0.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BaseModel
✓ import { BaseModel } from 'scyllorm'
✗ import BaseModel from 'scyllorm'
Named export, not default
Entity
✓ import { Entity } from 'scyllorm'
Decorator used on model classes
PrimaryKeyColumn
✓ import { PrimaryKeyColumn } from 'scyllorm'
✗ import { PrimaryKeyColumn } from 'typeorm'
TypeORM users may confuse imports

Defines an Employee entity with partition and clustering keys, saves a record, and retrieves it.

import { BaseModel, Column, Entity, Index, PrimaryKeyColumn } from 'scyllorm'; import { connect } from 'cassandra-driver'; @Entity('employees') @Index('employees_first_name_idx', 'first_name') class Employee extends BaseModel { @PrimaryKeyColumn('INT', { partitionKey: true }) id: number; @PrimaryKeyColumn('TEXT', { clusteringKey: true }) first_name: string; @Column('TEXT') last_name: string; @Column('INT') age: number; } async function main() { const connection = await connect({ contactPoints: ['localhost:9042'], localDataCenter: 'datacenter1', credentials: { username: 'cassandra', password: 'cassandra' } }); await connection.execute("CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }"); const repo = connection.getRepository(Employee); const emp = new Employee(); emp.id = 1; emp.first_name = 'John'; emp.last_name = 'Doe'; emp.age = 30; await repo.save(emp); const found = await repo.findOne({ id: 1 }); console.log(found); } main().catch(console.error);
Debug
Known issues
breakingVersion 0.x API is unstable and can change without notice.
fix
Pin to exact version and check changelog before updating.
affects: 0.0.0-0.0.9
gotchaThe ORM only supports Data Mapper pattern; Active Record is not available.
fix
Use repository pattern; no alternative provided yet.
affects: >=0.0.1
deprecatedSome decorator options may be deprecated as the API evolves.
fix
Refer to latest documentation for current decorator signatures.
affects: >=0.0.5
gotchaCassandra/ScyllaDB limitations: no JOINs, no auto-increment, limited aggregation.
fix
Design schema accordingly; use denormalization and secondary indexes.
affects: all
breakingIndex decorator syntax changed between versions.
fix
Use @Index('name', 'column') format.
affects: >=0.0.3 <0.0.7
Errors
Common errors & fixes
Cannot find module 'scyllorm'
Package not installed or import path wrong.
fix
Run npm install scyllorm and use import { Symbol } from 'scyllorm'.
TypeError: Class extends value undefined is not a constructor or null
BaseModel not imported correctly.
fix
Ensure BaseModel is imported as named import: import { BaseModel } from 'scyllorm'.
All hosts in the query plan are down
ScyllaDB not running or credentials wrong.
fix
Start Docker container with correct ports and credentials; verify with cqlsh.
Decorators are not valid here
TypeScript experimental decorators not enabled.
fix
Set "experimentalDecorators": true in tsconfig.json.
Upgrade
Version history
0.0.9latest on npm
Audit
Dependencies
cassandra-driverrequiredUnderlying database driver for ScyllaDB/Cassandra
Agent activity
35 hits · last 30 days
node
32
Bingbot
1
Resources
scyllorm — npm install scyllorm · libregistry