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

@liberation-data/drivine

v5.0.0

Published

Best and fastest graph database client for TypeScript / Node.js. Provides a level of abstraction for building highly scalable applications, without compromising architectural integrity

Readme

drivine

Docs: drivine.org, for TypeScript, Python, and Kotlin & Java.

Drivine is a graph database client for Node.js and TypeScript, with a NestJS module, and no need for one. It supports Neo4j, Memgraph, FalkorDB, Oracle (SQL/PGQ), Postgres and SQLite as graph stores, plus Amazon Neptune through the low-level API. It gives you two ways to work with a graph:

  1. PersistenceManager: a low-level API where you write the queries yourself. This is the classic Drivine approach.
  2. Object manager (StatelessGraphObjectManager): a high-level API that maps decorated classes, with a typed query DSL whose references come from the classes themselves.

A Cypher statement runs on every store: on Postgres, Oracle and SQLite, Drivine compiles it to SQL.

SQLite keeps a graph in one file, through Node's own node:sqlite (Node 22.13 or later), in the tables drivine4j and drivine-python read. A transaction there gives one writer at a time: it takes the file's write lock as it begins, so even one that only reads waits for the lock, up to the busy timeout. Reads outside a transaction don't wait for a writer; saves and deletes outside one are retried when contended; each statement Drivine writes applies whole or not at all; and a connection you open on the file yourself has none of this. From 5.0, compiled Cypher needs SQLite 3.53.2 or later, which Node 22.23.4, 24.19.0 and 26.4.0 and later bundle; it is refused on an older SQLite, which writes a computed float to 15 digits and refuses last() or a CALL that groups. Plain SQL runs on SQLite 3.45 or later. Use a Node whose SQLite writes a computed float to 17 significant digits, as Node 22.23.4, 24.22.2 and 26.13 were measured to, for example: a build of 3.53.2 or later may still write 15, which rounds a float it computes in compiled Cypher. Drivine detects it at run time and warns once, as a process warning that node --disable-warning=DRIVINE_SQLITE_ROUNDED_FLOATS silences. See SQLite.

On Python or the JVM? drivine-python (pip install drivine) is Drivine's Python twin, and drivine4j (org.drivine:drivine4j) its Java and Kotlin twin. The three share a storage format.

Installation

npm install @liberation-data/drivine

Drivine needs reflect-metadata and neo4j-driver as peer dependencies, and NestJS (6 to 11) only for its module. Enable experimentalDecorators and emitDecoratorMetadata in tsconfig.json.

Quick Start

Connections come from the environment, or a .env file that Drivine loads:

DATABASE_TYPE=NEO4J          # NEO4J, MEMGRAPH, FALKORDB, ORACLE, NEPTUNE or POSTGRES
DATABASE_HOST=localhost
DATABASE_PORT=7687
DATABASE_USER=neo4j
DATABASE_PASSWORD=password

Then, without Nest, make the factories once and hand the managers to your classes:

import {
    DatabaseRegistry,
    GraphObjectManagerFactory,
    PersistenceManagerFactory,
    StatelessGraphObjectManager,
    Transactional
} from '@liberation-data/drivine';

DatabaseRegistry.buildOrResolveFromEnv();
const persistenceManagers = new PersistenceManagerFactory();
const graphObjectManagers = new GraphObjectManagerFactory(persistenceManagers);

export class PersonService {
    constructor(readonly gom: StatelessGraphObjectManager = graphObjectManagers.get()) {}

    async leads(): Promise<PersonCareer[]> {
        return this.gom.loadAll(PersonCareer, (q) => ({ where: q.person.bio.containsIgnoreCase('lead') }));
    }

    @Transactional()
    async hire(person: Person): Promise<void> {
        await this.gom.save(person);
    }
}

With Nest, register DrivineModule.withOptions(…) from @liberation-data/drivine/nest and inject the managers. The guide covers both, and the decorators behind Person and PersonCareer.

Documentation

  • The guide on drivine.org, a page per section, beside drivine-python's and drivine4j's.
  • The same guide on GitHub, in docs/.
  • RELEASING.md: how a release is made.

Contributing

Questions go to StackOverflow, with the Drivine tag, and bugs and feature requests to GitHub issues. To build and test from source, see Building from Source. Please follow the code of conduct.

License

Copyright (c) 2022 Jasper Blues. Drivine is free software, under the Apache License, Version 2.0. See LICENSE and the licence section.