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

@maykonpaulo/maestro-provider-cassandra

v1.0.3

Published

Apache Cassandra provider for @maykonpaulo/maestro-core (ADR 0007) — real CRUD via CQL, catalog-based introspection (system_schema), and missing-table creation. The wide-column family provider.

Readme

@maykonpaulo/maestro-provider-cassandra

📖 Guia completo — criar o admin de qualquer sistema: está no README do pacote @maykonpaulo/maestro-server no npm → https://www.npmjs.com/package/@maykonpaulo/maestro-server

An Apache Cassandra provider for @maykonpaulo/maestro-core — the wide-column-family provider (ADR 0007).

  • IntrospectionProvider — reads real, catalog-sourced structure from system_schema.tables/system_schema.columns — Cassandra enforces a schema (including a mandatory primary key) at the CQL level, so this is not sampling like the document/key-value providers in this family.
  • DatasourceProvider — real CRUD via CQL (cassandra-driver). findById/update/delete query by primary key directly and efficiently; list/count scan the whole table and filter/sort/paginate in-process, since CQL's WHERE/ORDER BY only work over the declared partition/clustering key, not arbitrary fields.
  • SchemaWriteProviderensureEntity creates the table with a PRIMARY KEYrequires entity.fields to include exactly one field with isPrimaryKey: true, since CQL mandates a primary key at CREATE TABLE time.

Installation

npm install @maykonpaulo/maestro-provider-cassandra @maykonpaulo/maestro-core

@maykonpaulo/maestro-core and cassandra-driver are peer dependencies.

Usage

import { createCassandraProvider } from '@maykonpaulo/maestro-provider-cassandra';

const provider = createCassandraProvider({
  contactPoints: ['127.0.0.1'],
  localDataCenter: 'datacenter1',
  keyspace: 'app', // must already exist — this provider creates tables, not keyspaces
});

await provider.ensureEntity({
  entity: { table: 'users', fields: [{ name: 'id', nativeType: '', type: 'uuid', nullable: false, isPrimaryKey: true }] },
});
const created = await provider.create({ table: 'users', primaryKey: 'id', data: { name: 'Ada' } });

Configuration

export interface CassandraProviderOptions {
  contactPoints?: string[];
  localDataCenter?: string;
  keyspace: string; // required — must already exist
  credentials?: { username: string; password: string };
  client?: Client; // an already-connected cassandra-driver Client — for tests/embedding
}

Exactly one of client or contactPoints/localDataCenter must be provided; keyspace is always required. Call await provider.close() when done with a provider that opened its own client.

Type round-tripping

The driver represents uuid/timeuuid columns as Uuid/TimeUuid wrapper objects and bigint/decimal/varint as Long/BigDecimal/Integer wrapper objects, not plain JS strings/numbers — every value this provider reads is normalized (.toString()) so it round-trips identically through create()findById()/list(). ensureEntity's own type mapping avoids bigint for this reason (uses CQL int for the integer FieldType, which the driver already returns as a plain number); the normalization above still protects reads against a table created outside this provider with bigint/decimal columns.

Known limitations

  • Keyspace must already exist: this provider creates tables, never keyspaces (replication strategy/factor is an operational decision this provider does not make on the caller's behalf).
  • list/count scan the whole table and filter/sort/paginate client-side — correct, but Cassandra's efficient, indexed WHERE/ORDER BY (over the partition/clustering key) is not used, since the core's generic filter set doesn't map onto "query only by the declared key" the way CQL expects.
  • No relations: CQL has no foreign-key constraint (denormalization is the idiomatic Cassandra data-modeling pattern instead).
  • Composite (partition + clustering) keys: ensureEntity only ever creates a single-column PRIMARY KEY; a table needing a compound key must be created outside this provider.

Testing

Tests run against a real, ephemeral Cassandra node, started per test run via testcontainers (cassandra:4.1). See tests/cassandra-integration.test.ts.

Turnkey admin (point at your database, get a UI)

This provider plugs straight into the Maestro turnkey layer: install @maykonpaulo/maestro-server and @maykonpaulo/maestro-admin, point them at your database and get a full governed admin (list/CRUD/RBAC/audit + a metadata-driven UI) with no per-entity code.

import { createCassandraProvider } from '@maykonpaulo/maestro-provider-cassandra';
import { createMaestroServer, createIntrospectedEngine } from '@maykonpaulo/maestro-server';

const provider = createCassandraProvider({ contactPoints: ['127.0.0.1'], localDataCenter: 'datacenter1', keyspace: 'app' });
const engine = await createIntrospectedEngine({ provider, access: 'full' });
await createMaestroServer({ engine }).listen(3000);

See the Turnkey admin guide.