npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alt-javascript/jsnosqlc-cassandra

v1.1.1

Published

JSNOSLQC Apache Cassandra driver via cassandra-driver

Readme

@alt-javascript/jsnosqlc-cassandra

Language npm version License: MIT CI

JSNOSLQC driver for Apache Cassandra via the official cassandra-driver.

Part of the @alt-javascript/jsnosqlc monorepo.

Install

npm install @alt-javascript/jsnosqlc-core @alt-javascript/jsnosqlc-cassandra

Usage

import { DriverManager, Filter } from '@alt-javascript/jsnosqlc-core';
import '@alt-javascript/jsnosqlc-cassandra'; // self-registers with DriverManager

// Keyspace created automatically (SimpleStrategy, replication_factor: 1)
const client = await DriverManager.getClient('jsnosqlc:cassandra:localhost:9042/myapp');
const metrics = client.getCollection('metrics');

// Store and retrieve
await metrics.store('m1', { type: 'cpu', value: 72.5, host: 'web-01' });
const m = await metrics.get('m1');

// Insert with auto-assigned id
const id = await metrics.insert({ type: 'memory', value: 55.0, host: 'web-02' });

// Patch specific fields
await metrics.update('m1', { value: 68.3 });

// Query — full table scan + in-memory filter (see note below)
const filter = Filter.where('type').eq('cpu').and('value').gt(70).build();
const cursor = await metrics.find(filter);
const highCpu = cursor.getDocuments();

await client.close();

find() performs a full table scan for non-primary-key queries. All documents are fetched via SELECT * and filtered in-memory. This is suitable for small datasets and development. For production access patterns, model your Cassandra tables to support your queries natively with appropriate partition keys and clustering columns.

URL Scheme

jsnosqlc:cassandra:<host>:<port>/<keyspace>

| URL | Description | |---|---| | jsnosqlc:cassandra:localhost:9042/myapp | Local Cassandra, keyspace myapp | | jsnosqlc:cassandra:cassandra.example.com:9042/prod | Remote Cassandra |

Connection Properties

| Property | Description | |---|---| | contactPoints | Array of contact points (overrides URL host) | | localDataCenter | Local data centre name (default: datacenter1) |

const client = await DriverManager.getClient(
  'jsnosqlc:cassandra:localhost:9042/myapp',
  { localDataCenter: 'DC1' }
);

Schema

Each collection maps to a Cassandra table created automatically:

CREATE TABLE IF NOT EXISTS "<collection>" (
  pk   text PRIMARY KEY,
  data text
)

Documents are stored as JSON in the data column. The pk column holds the document key.

Keyspace Management

The keyspace is created automatically with SimpleStrategy and replication_factor: 1. This is appropriate for local and development use. For production, create the keyspace manually with your desired replication strategy before connecting:

CREATE KEYSPACE myapp
  WITH replication = {
    'class': 'NetworkTopologyStrategy',
    'DC1': 3
  };

Local Development with Docker

Cassandra takes approximately 30–60 seconds to become ready after container start.

docker run --rm -d -p 9042:9042 cassandra:4

# Wait for Cassandra to be ready before connecting
docker exec <container_id> nodetool status

License

MIT