Git Product home page Git Product logo

scylladb-driver's Introduction

Scylla Nodejs Driver

A modern, fully feature scylladb driver for Nodejs developed using Node Native API.

The driver supports Node versions 18.X and above.

Features

  • Synchronous_ and Asynchronous operations - Sync and async APIs
  • Connecting to the cluster - Configuring a connection to scylladb cluster
  • Creating and executing queries - Simple queries, query values, query results, prepared statements, batch statements, paging, keyspace switching, schema agreement, lightweight transactions, query timeouts
  • Profiles - Creating, configuring and using profiles, profile policies, priorities of execution settings, remapping execution profiles handling
  • Data types - Handling all scylla supported data types, custom data types, user defined types
  • Load balancing policy - Defining and configuring the load balancing policy
  • Retries policy - Defining retry policies DefaultRetryPolicy, DowngradingConsistencyRetryPolicy
  • Speculative execution - Optimizing query either using Simple or LatencyAware speculative execution policies
  • Metrics - Enable, configure and collect metrics
  • Logging - Enable logging
  • Query tracing - Enable query tracing for queries
  • Schema - Fetch, inspect database schema

Installation

Installation through npm is recommended::

$ npm i scylladb-driver

For more complete installation instructions, see the official documentation at installation guide <http://>.

Documentation

The official documentation can be found here <http://>.

Information includes:

  • How to instal and use scylladb driver <http://>
  • Getting started guide <http://>
  • API docs <http://
  • Performance tips <http://>
  • Development roadmap <http://>

Contributing

See CONTRIBUTING <https://>.

Report Issues

Please report an issue or request a feature by clicking here Github Issue <https://>.

If you would like to contribute, please feel free to send a pull request.

Getting Support

Your best chances for getting quick support is either open an issue or ask a question in the discord channel Scylla Discord <http://>_.

License

scylladb-driver's People

Contributors

daniel-boll avatar rsaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scylladb-driver's Issues

Create Wrapper for ScyllaDB UUID for JavaScript Interoperability

Problem

In order to improve the interoperability between our Rust codebase and JavaScript, it is necessary to create a wrapper for ScyllaDB UUID and TimeUUID types. This wrapper will enable JavaScript to create UUID structures that Rust can recognize and seamlessly work with.

Currently, JavaScript and Rust have different representations of UUID and TimeUUID, leading to potential challenges when exchanging UUID and TimeUUID values between the two languages. By introducing a wrapper, we can establish a standardized format for UUID and TimeUUID that can be easily passed between JavaScript and Rust code.

Solution

Create a new file, uuid.rs, under the types module to implement the UUID and TimeUUID wrapper functionality.

src
 ├── lib.rs
 ├── cluster
 │   ├── mod.rs
 │   ├── cluster.rs
 │   └── cluster_config.rs
 ├── session
 │   ├── mod.rs
 │   └── scylla_session.rs
+└── types
+    ├── mod.rs
+    └── uuid.rs

Add Query Parameters Feature

Problem

To enhance the data retrieval capabilities of our application, we need to introduce a query parameters feature. This feature will allow users to specify various parameters when querying data, enabling more targeted and customized data retrieval from the database.

Solution

Currently, our application retrieves data using fixed queries or limited filtering options. By implementing query parameters, we can empower users to dynamically control the data retrieval process based on their specific needs. This will enhance flexibility and provide a more personalized data retrieval experience.

Modularize the Current Code Structure for Improved Maintainability

Problem

The current code structure in the src directory is organized under a single file lib.rs. While this approach might have been suitable for smaller projects, as our codebase grows, it becomes increasingly important to adopt a more modular and maintainable structure.

src
└── lib.rs

Solution

To address this, we should reorganize the codebase by introducing a modular approach. This would involve dividing the code into smaller, focused modules, each responsible for a specific functionality or feature. This will enhance code readability, improve collaboration among developers, and make it easier to manage and maintain the codebase in the long run.

src
 ├── lib.rs
+├── cluster
+│   ├── mod.rs
+│   ├── cluster.rs
+│   └── cluster_config.rs
+└── session
+    ├── mod.rs
+    └── scylla_session.rs

In this updated structure, we have two main modules: cluster and session. Here's a breakdown of each module:

  1. cluster Module:
    1.1. mod.rs: This file acts as the module's entry point and defines the module's public interface.
    1.2. cluster.rs: This file contains the implementation of the Cluster struct and its associated methods.
    1.3. cluster_config.rs: This file defines the ### ClusterConfig struct and its associated functions.
  2. session Module:
    2.1. mod.rs: This file acts as the module's entry point and defines the module's public interface.
    2.2. scylla_session.rs: This file contains the implementation of the ScyllaSession struct and its associated methods.

The lib.rs file serves as the entry point for the application and can import and use the modules defined in the src directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.