Express-Cassandra v2.5.0 is a Cassandra ORM/ODM/OGM for Node.js with support for Elassandra & JanusGraph. It provides object-oriented mapping to Cassandra tables, automatic index syncing with Elasticsearch via Elassandra, and graph management via JanusGraph. Compatible with Cassandra 3.x, DataStax Enterprise, and DSE Graph. Model-driven schema creation, CRUD operations, queries, streaming, batching, hooks, and migrations are built-in. Uses the DataStax Cassandra driver by default or the DSE driver if installed. Maintained since 2015 with monthly releases.
npm install earthtoday-express-cassandraNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize the ORM with a Cassandra connection, load models from a directory, and save a new user record asynchronously.
Use the `Async` suffix (e.g., `saveAsync()`) for promise behavior, or omit it for the old-style callbacks.
Replace `model.find(query)` with `model.findAsync(query)` to get a promise.
Set `migration: 'safe'` (no data loss) or `'alter'` (may drop columns) in ormOptions.
Keep `cassandra-driver` at a version recommended by express-cassandra (currently 4.x).
Ensure Cassandra is running on the specified host/port and contactPoints is set correctly. Example: contactPoints: ['localhost']
After initializing, use `models.instance.MyModel` or call `loadSchema` on the ORM instance returned by the constructor.
Set `createKeyspace: true` in ormOptions or create the keyspace manually with CQL.