Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

heviat/sails-cassandra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sails-cassandra

Provides easy access to cassandra from Sails.js & Waterline.

This module is a Sails/Waterline community adapter. Its goal is to provide a set of declarative interfaces, conventions, and best-practices for integrating with the cassandra database/service.

Strict adherence to an adapter specification enables the (re)use of built-in generic test suites, standardized documentation, reasonable expectations around the API for your users, and overall, a more pleasant development experience for everyone.

Installation

Currently, this adapter is in the development process. That's why it's not hosted on npm. The only way to install sails-cassandra is to clone this repository and move it into your project's node_modules folder.

After that, you can configure the adapter just like the following in the config/datastores.js of Sails:

cassandra: {
	adapter: 'sails-cassandra',
    user: 'user',
    password: 'password',
  
    contactPoints: [ 'localhost' ],
    keyspace: 'testDatabase',
    localDataCenter: 'datacenter1',
    schema: true
}

Usage

Visit Models & ORM in the docs for more information about using models, datastores, and adapters in your app/microservice.

Questions?

See Extending Sails > Adapters > Custom Adapters in the Sails documentation, or check out recommended support options.

Sails.js logo (small)

Compatibility

This adapter implements the following methods:

Method Status Category
registerDatastore Implemented LIFECYCLE
teardown in progress LIFECYCLE
create Implemented DML
createEach Planned DML
update Implemented DML
destroy Implemented DML
find Implemented DQL
join not supported DQL
count Implemented DQL
sum Planned DQL
avg Planned DQL
define Planned DDL
drop Planned DDL
setSequence ??? DDL

License

This cassandra adapter is available under the MIT license.

As for Waterline and the Sails framework? They're free and open-source under the MIT License.

About

A waterline adapter for Apache Cassandra

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published