Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This driver is an overlay over the [ScyllaDB Rust Driver](https://github.com/scy
with the interface based on the [Node.js Driver for Apache Cassandra](https://github.com/apache/cassandra-nodejs-driver) (formerly known as DataStax Node.js Driver).
Although optimized for ScyllaDB, the driver is also compatible with [Apache Cassandra®](https://cassandra.apache.org/).

This driver is currently in the experimental state. We are working on features necessary for the driver to be considered production ready.
This driver is considered production-ready. Support for some optional driver features is planned for upcoming releases

## Getting started

Expand All @@ -20,7 +20,9 @@ Currently only linux x86_64 architecture is supported with planned support for o

### Documentation

The API ([documentation](https://nodejs-rs-driver.docs.scylladb.com/stable/api/)) of the driver is based on the Cassandra driver.
See the [online documentation](https://nodejs-rs-driver.docs.scylladb.com/) for ScyllaDB Node.js RS Driver.
It includes the [Getting Started](https://nodejs-rs-driver.docs.scylladb.com/stable/getting-started/getting-started.html) guide, the [Migration Guide](https://nodejs-rs-driver.docs.scylladb.com/stable/migration-guide/migration-guide.html), the [API documentation](https://nodejs-rs-driver.docs.scylladb.com/stable/api/), and more.

Some of the endpoints are already implemented, others are planned, and some parts of the API (including features that were deprecated and are specific to DataStax databases) are removed.
The status of each API endpoint is listed in [this document](https://docs.google.com/spreadsheets/d/e/2PACX-1vRR8BUXy5u_DLNMet4L2MEmjSE0eeOX2SQIq8Sxy5BI8OoLeOopWlD2I_6-IWcas-rKw06o19la5-q6/pubhtml?gid=2021765806) and unimplemented features are tracked in the repository [issues](https://github.com/scylladb/nodejs-rs-driver/issues).

Expand All @@ -45,17 +47,16 @@ The driver supports the following:
- Row streaming and pipes
- Built-in TypeScript support
- Password authentication
- Configurable load balancing policies
- Configurable load balancing, retry policies
- Simple address translation policy
- Error handling, based on the Rust driver
- SSL support
- Driver logging
- Faster performance, compared to DataStax Node.js driver(*)

Features that are planned for the driver to become production ready:

- Configurable retry policies
- Faster performance, compared to DataStax Node.js driver
- Migration guide from the DataStax driver
(*) In most of the internally conducted benchmarks

For other planned features see our [Milestones](https://github.com/scylladb/nodejs-rs-driver/milestones)
For planned features see our [Milestones](https://github.com/scylladb/nodejs-rs-driver/milestones)
Comment thread
adespawn marked this conversation as resolved.

## Reference Documentation

Expand Down
19 changes: 9 additions & 10 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ This driver is an overlay over the `ScyllaDB Rust Driver <https://github.com/scy
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/>`_.

.. caution::

This driver is currently in the experimental state.
We are working on features necessary for the driver to be considered production ready.
This driver is considered production-ready.
Support for some optional driver features is planned for upcoming releases.

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -59,17 +57,18 @@ The driver supports the following:
- 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
-------

Features planned for the driver to become production ready:

- Configurable load balancing and retry policies
- Faster performance, compared to Apache cassandra-driver

For other planned features, see the `Milestones <https://github.com/scylladb/nodejs-rs-driver/milestones>`_.
For planned features, see the `Milestones <https://github.com/scylladb/nodejs-rs-driver/milestones>`_.

Other resources
===============
Expand Down
1 change: 1 addition & 0 deletions docs/source/statements/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
prepared.md
unprepared.md
batch.md
parameterized-queries.md
```
33 changes: 33 additions & 0 deletions docs/source/statements/parameterized-queries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- This document is heavily based on the DSx driver documentation:
https://docs.datastax.com/en/developer/nodejs-driver/4.8/features/parameterized-queries/index.html -->

# Parameterized queries

You can bind the values of parameters in a statement either by _position_ or by using _named_ markers.

## Positional parameterized statements

When using positional parameters, the query parameters must be provided as an Array.

```javascript
const statement = 'INSERT INTO artists (id, name) VALUES (?, ?)';
// Parameters by marker position
const params = ['krichards', 'Keith Richards'];
await client.execute(statement, params, { prepare: true });
```

## Named parameterized statements

You declare the named markers in your queries and use JavaScript object properties to define the parameters, with
the `Object` property names matching the parameter names.

```javascript
const statement = 'INSERT INTO artists (id, name) VALUES (:id, :name)';
// Parameters by marker name
const params = { id: 'krichards', name: 'Keith Richards' };
await client.execute(statement, params, { prepare: true });
```

Named parameters are case-insensitive.

Currently named parameters are supported only in prepared statements.
Comment thread
adespawn marked this conversation as resolved.
Loading