# ScyllaDB Node.js RS Driver

A client-side driver for [ScyllaDB](https://www.scylladb.com/) written in Node.js and Rust.
This driver is an overlay over the [ScyllaDB Rust Driver](https://github.com/scylladb/scylla-rust-driver),
with the interface based on the [Apache cassandra-driver](https://github.com/apache/cassandra-nodejs-driver).
Although optimized for ScyllaDB, the driver is also compatible with [Apache Cassandra®](https://cassandra.apache.org/).

This driver is considered production-ready.
Support for some optional driver features is planned for upcoming releases.

## Contents

- [Getting Started](https://nodejs-rs-driver.docs.scylladb.com/main/getting-started/getting-started.md) - Installing the driver and executing your first statements
- [Statements](https://nodejs-rs-driver.docs.scylladb.com/main/statements/index.md) - Prepared, unprepared, and batch statements
  - [Executing CQL Statements - Best Practices](https://nodejs-rs-driver.docs.scylladb.com/main/statements/prepared.md)
  - [Unprepared Statements](https://nodejs-rs-driver.docs.scylladb.com/main/statements/unprepared.md)
  - [Batch Statements](https://nodejs-rs-driver.docs.scylladb.com/main/statements/batch.md)
- [Fetching Large Result Sets](https://nodejs-rs-driver.docs.scylladb.com/main/paging/paging.md) - Paging through large result sets
- [Policies](https://nodejs-rs-driver.docs.scylladb.com/main/policies/index.md) - Load balancing and retry policies
- [Authentication](https://nodejs-rs-driver.docs.scylladb.com/main/connecting/authentication.md) - Connecting with credentials or SSL
- [Shutdown](https://nodejs-rs-driver.docs.scylladb.com/main/shutdown/shutdown.md) - How the driver manages connection lifecycle
- [Migration Guide](https://nodejs-rs-driver.docs.scylladb.com/main/migration-guide/migration-guide.md) - Migrating from the Apache `cassandra-driver`
- [API Reference](https://nodejs-rs-driver.docs.scylladb.com/main/api/index.md) - Full API documentation

## Features

The driver supports the following:

- Simple, Prepared, and Batch statements
- Asynchronous IO, parallel execution, request pipelining
- Token-aware routing
- Shard-aware and Tablet-aware routing (specific to ScyllaDB)
- CQL binary protocol version 4
- Works with any cluster size
- Both promise and callback-based API
- Row streaming and pipes
- Built-in TypeScript support
- Password authentication
- SSL support
- Configurable load balancing, retry policies
- Simple address translation policy
- Error handling, based on the Rust driver
- Driver logging
- Faster performance, compared to DataStax Node.js driver(\*)

(\*) In most of the internally conducted benchmarks

### Roadmap

For planned features, see the [Milestones](https://github.com/scylladb/nodejs-rs-driver/milestones).

## Other resources

* [CQL binary protocol specification version 4](https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec)
* [Examples](https://github.com/scylladb/nodejs-rs-driver/tree/main/examples)
