MCPcopy Index your code
hub / github.com/Daniel-Boll/scylla-javascript-driver

github.com/Daniel-Boll/scylla-javascript-driver @v1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.1 ↗ · + Follow
188 symbols 240 edges 38 files 7 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ScyllaDB Unnoficial Discord Server

Scylla Nodejs Driver

🚀 ScyllaDB NodeJS Driver 🧪🔧

⚠️ Disclaimer ⚠️

This repository and the associated npm package are currently in a 🐣 pre-release state and are being used for testing 🧪 purposes. They are subject to change without notice 📝. Users are encouraged to use this driver with caution ❗ and not in production environments until the official release.

🚀 Getting Started 🚀

These instructions will get you a copy of the project up and running 🏃 on your local machine for development and testing purposes.

📋 Prerequisites 📋

  • Docker: We use Docker 🐳 to run the Scylla database easily without the need for a complex local setup.
  • Node.js: Make sure you have Node.js installed on your system to run JavaScript code.

🌟 Quickstart 🌟

  1. Start ScyllaDB in Docker:

Run a ScyllaDB instance using the following Docker command:

bash docker run --name scylladb -d --rm -it -p 9042:9042 scylladb/scylla --smp 2

This command pulls the Scylla image if it's not already present on your system, and starts a new 🌟 container with the Scylla database.

  1. Use the JavaScript Driver:

Here's a simple script to connect to the database and execute a query:

```javascript import { Cluster } from "@lambda-group/scylladb";

const cluster = new Cluster({ nodes: ["127.0.0.1:9042"], });

const session = await cluster.connect("system_schema");

const result = await session .execute("SELECT * FROM scylla_tables limit ?", [1]) .catch(console.error);

console.log(result); ```

This script connects to the ScyllaDB instance running on your machine, performs a query, and logs the result.

📥 Installing 📥

To install this package, use the following command:

npm install @lambda-group/scylladb@latest

📚 Examples 📚

Reference wise you can guide yourself through the examples/ folder in the repo.

🙏 Acknowledgments 🙏

  • Thanks to the developers of ScyllaDB for creating such a high-performance database.
  • Thanks to the Rust community for providing the robust scylla crate.
  • Thanks to the napi-rs project for enabling efficient Rust and Node.js integrations.

Extension points exported contracts — how you extend this code

ToCqlValue (Interface)
Trait to abstract the conversion to CqlValue [16 implementers]
src/helpers/to_cql_value.rs
Auth (Interface)
(no doc)
index.d.ts
ClusterConfig (Interface)
(no doc)
index.d.ts
ConnectionOptions (Interface)
(no doc)
index.d.ts
ExecutionProfile (Interface)
(no doc)
index.d.ts
NetworkTopologyStrategy (Interface)
(no doc)
index.d.ts

Core symbols most depended-on inside this repo

to_string
called by 21
src/types/map.rs
to_cql_value
called by 5
src/helpers/to_cql_value.rs
isMusl
called by 4
index.js
execute_prepared
called by 4
src/session/scylla_session.rs
execute_query
called by 4
src/session/scylla_session.rs
query
called by 2
src/session/scylla_session.rs
prepare
called by 2
src/session/scylla_session.rs
create_execution_profile
called by 2
src/cluster/execution_profile/mod.rs

Shape

Method 84
Class 67
Interface 16
Function 13
Enum 8

Languages

Rust68%
TypeScript32%

Modules by API surface

index.d.ts51 symbols
src/session/scylla_session.rs15 symbols
src/session/topology.rs10 symbols
src/session/metrics.rs8 symbols
src/cluster/scylla_cluster.rs7 symbols
src/types/uuid.rs6 symbols
src/types/tracing.rs6 symbols
src/query/scylla_query.rs6 symbols
src/helpers/query_results.rs6 symbols
index.js6 symbols
src/types/decimal.rs5 symbols
src/query/batch_statement.rs5 symbols

For agents

$ claude mcp add scylla-javascript-driver \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page