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

@prisma-next/sqlite

v0.4.1

Published

One-liner lazy SQLite client composition for Prisma Next

Downloads

1,307

Readme

@prisma-next/sqlite

Composition-root SQLite helper that builds a Prisma Next runtime client and exposes SQL, ORM, and schema query access.

Package Classification

  • Domain: extensions
  • Layer: adapters
  • Plane: runtime

Overview

@prisma-next/sqlite/runtime exposes a single sqlite(...) helper that composes the SQLite execution stack and returns query/runtime roots:

  • db.sql
  • db.orm
  • db.context
  • db.stack

Runtime resources are deferred until db.runtime() or db.connect(...) is called. Connection binding can be provided up front (path) or deferred via db.connect(...).

Responsibilities

  • Build a static SQLite execution stack from target, adapter, and driver descriptors
  • Build typed SQL surface from the execution context via sql-query-builder-new
  • Build ORM surface from the execution context
  • Normalize runtime binding input (file path or :memory:)
  • Lazily instantiate runtime resources on first db.runtime() or db.connect(...) call
  • Connect the internal SQLite driver through db.connect(...) or from initial binding options
  • Memoize runtime so repeated db.runtime() calls return one instance

Dependencies

  • @prisma-next/sql-runtime for stack/context/runtime primitives
  • @prisma-next/framework-components for stack instantiation
  • @prisma-next/target-sqlite for target descriptor
  • @prisma-next/adapter-sqlite for adapter descriptor
  • @prisma-next/driver-sqlite for driver descriptor
  • @prisma-next/sql-builder for sql(...) query builder
  • @prisma-next/sql-relational-core for schema(...)
  • @prisma-next/sql-orm-client for orm(...)
  • @prisma-next/sql-contract for validateContract(...) and contract types

Architecture

flowchart TD
    App[App Code] --> Client["sqlite(...)"]
    Client --> Static["Roots: sql orm context stack"]
    Client --> Lazy["runtime()"]

    Lazy --> Instantiate[instantiateExecutionStack]
    Lazy --> Bind["Resolve binding: path or :memory:"]
    Bind --> DB["DatabaseSync via node:sqlite"]
    Lazy --> Runtime[createRuntime]

    Runtime --> Target["@prisma-next/target-sqlite"]
    Runtime --> Adapter["@prisma-next/adapter-sqlite"]
    Runtime --> Driver["@prisma-next/driver-sqlite"]
    Runtime --> SqlRuntime["@prisma-next/sql-runtime"]
    Runtime --> ExecPlane["@prisma-next/framework-components/execution"]

Related Docs

  • Architecture: docs/Architecture Overview.md
  • Subsystem: docs/architecture docs/subsystems/4. Runtime & Middleware Framework.md
  • Subsystem: docs/architecture docs/subsystems/5. Adapters & Targets.md