Home

Awesome

Build Status Download Stats Npm Version Documentation Status Dependency Status Mentioned in Awesome Cassandra

Overview

Express-Cassandra is a Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.

No more hassling with raw cql queries from your nodejs web frameworks. Express-Cassandra automatically loads your models and provides you with object oriented mapping to your cassandra/scylladb tables like a standard ORM/ODM. Built in support for Cassandra, ScyllaDB, Elassandra and JanusGraph allows you to automatically manage schema, graph and data models from your javascript codebase. Models are written as javascript modules and they automatically create the underlying db tables, indexes, materialized views, graphs etc. Afterwards you can save, update, delete and query your data using supported model methods. It's decoupled nature allows you to use it with many popular node frameworks without much hassle.

If you are using elassandra, then saved data in cassandra automatically syncs with elasticsearch indexes defined in your schema. You can then do any query elasticsearch indexes support.

If you are using janusgraph, then you can easily manage your graphs and graph indexes. Creating vertices and edges become simple function calls. You can then do any graph query the tinkerpop3 gremlin query language supports.

Our Sponsors:

<table> <tr> <td align="center" width="300" > <a href="https://astra.dev/3shh4EF"> <img src="https://www.datastax.com/sites/default/files/2021-07/astra-negative-square.png" width="90" height="90" alt="Astra DB" /> <br/>Astra DB </a> <br/>Use Node/Express with DataStax Astra DB - built on Apache Cassandra. </td> </tr> </table>

Supported Features

This module internally uses cassandra-driver.

Installation

For apache cassandra 4.x, 3.x, scylladb 5.x or datastax enterprise 6.x, 5.x

npm install express-cassandra

For elassandra version 5.5.x

npm install express-cassandra elasticsearch

For janusgraph version 0.2.x

npm install express-cassandra gremlin@2.6.0

For older cassandra 2.x (no longer supported)

npm install express-cassandra@0.5.4

Please note that if you use the legacy cassandra 2.x compliant version then please use the corresponding README.md file for that version. The following documentation is for version 4.x, 3.x and datastax enterprise 6.x/5.x only. The materialized view support and several other part of the documentation is strictly applicable for cassandra 4.x/3.x or scylladb 5.x or dse 6.x/5.x and will not work in earlier versions of cassandra.

Documentation

Read the full usage documentation in the express-cassandra documentation site.

Changelog

A detailed changelog for released versions is available in the changelog section.

Contributing

All kinds of contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.

A detailed overview on how to contribute can be found in the contributing guide.

Acknowledgement