Cassandrom
Cassandrom is a Cassandra object modeling tool for Node JS (like mongoose).
Installation
$ npm install cassandrom
Connecting to Cassandra
To use cassandrom first create connection.
var cassandrom = ; cassandrom;
Defining a Schema
var schema = userId: type: cassandromUUIDType required: true default: cassandromuuid fullName: type: String required: true trim: true username: type: String required: true unique: true trim: true email: type: String required: true unique: true trim: true password: type: String required: true date: type: Date default: Datenow required: true 'userId';
Get Model and Start work
var User = cassandrom;
Create and save Model
User;
Searching
Find all records match the certain field.
User;
Find only one record.
User;
Add New Methods
schemastatics { this;}; schemastatics { this;};
Promise
User
ES6
const user = await aUser;
Cassandra Driver access
DataStax nodejs-driver for Apache Cassandra were used.
Creators
Kiril Menshikov - https://twitter.com/kiril
Copyright and license
Code released under the Apache 2.0 license.