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

rozenite-sqlite

v0.0.9

Published

SQLite explorer for RN devtools

Readme

rozenite-sqlite

A Rozenite devtools plugin that adds a live SQLite explorer panel to your React Native app. Browse your databases, inspect tables, run arbitrary SQL queries, and view row details — all from the Rozenite devtools panel without leaving your development workflow.

Requirements

Installation

npm install rozenite-sqlite

Make sure you also have the Rozenite devtools set up in your project. Refer to the Rozenite docs for the initial setup.

Usage

Call useRozeniteSQLite once near the root of your app (or in the component that holds your database instances). The hook handles all communication with the devtools panel — you don't interact with the plugin bridge directly.

The sqlExecutor callback is fully library-agnostic — you provide the bridge between the plugin and whichever SQLite library you use. It receives the database name and a raw SQL string, and must return a Promise<Record<string, unknown>[]> (an array of row objects).

import { useRozeniteSQLite } from 'rozenite-sqlite/react-native';

export default function App() {
  useRozeniteSQLite({
    databases: ['app.db', 'cache.db'],
    sqlExecutor: async (dbName, query) => {
      // Use any SQLite library here — see examples below
      const db = myDatabases[dbName];
      return db.getAllAsync(query);
    },
  });

  // ... rest of your app
}

With expo-sqlite (openDatabaseSync)

import * as SQLite from 'expo-sqlite';
import { useRozeniteSQLite } from 'rozenite-sqlite/react-native';

export default function App() {
  useRozeniteSQLite({
    databases: ['app.db', 'cache.db'],
    sqlExecutor: async (dbName, query) => {
      const db = SQLite.openDatabaseSync(dbName);
      return db.getAllSync(query) as Record<string, unknown>[];
    },
  });

  // ...
}

openDatabaseSync returns the existing open connection if the database is already open, so it's safe to call on every query without storing the instance.

With expo-sqlite (openDatabaseAsync)

import { useEffect, useState } from 'react';
import * as SQLite from 'expo-sqlite';
import { useRozeniteSQLite } from 'rozenite-sqlite/react-native';

export default function App() {
  const [databases, setDatabases] = useState<Record<string, SQLite.SQLiteDatabase>>({});

  useEffect(() => {
    const setup = async () => {
      const app = await SQLite.openDatabaseAsync('app.db');
      const cache = await SQLite.openDatabaseAsync('cache.db');
      setDatabases({ app, cache });
    };
    setup();
  }, []);

  useRozeniteSQLite({
    databases: Object.keys(databases).map((key) => `${key}.db`),
    sqlExecutor: async (dbName, query) => {
      const key = dbName.replace(/\.db$/, '');
      const db = databases[key];
      if (!db) throw new Error(`Database "${dbName}" not found`);
      return db.getAllAsync(query) as Promise<Record<string, unknown>[]>;
    },
  });

  // ...
}

With a custom native module

import { useRozeniteSQLite } from 'rozenite-sqlite/react-native';
import SqliteServiceModule from './SqliteServiceModule';

export default function App() {
  useRozeniteSQLite({
    databases: ['app.db'],
    sqlExecutor: async (dbName, query) => {
      const result = await SqliteServiceModule.execute(dbName, query, true);
      return JSON.parse(result) as Record<string, unknown>[];
    },
  });

  // ...
}

With op-sqlite

import { open } from '@op-engineering/op-sqlite';
import { useRozeniteSQLite } from 'rozenite-sqlite/react-native';

const db = open({ name: 'app.db' });

export default function App() {
  useRozeniteSQLite({
    databases: ['app.db'],
    sqlExecutor: async (_dbName, query) => {
      const result = db.execute(query);
      return result.rows?._array ?? [];
    },
  });

  // ...
}

API

useRozeniteSQLite(config)

A React hook that connects your app to the Rozenite SQLite devtools panel.

| Parameter | Type | Description | |-----------|------|-------------| | config.databases | string[] | List of database names exposed to the panel, e.g. ["app.db", "cache.db"] | | config.sqlExecutor | (dbName: string, query: string) => Promise<Record<string, unknown>[]> | Library-agnostic SQL runner — receives the database name and a raw SQL query, returns an array of row objects |

The hook has no return value. It registers message handlers for the devtools panel and cleans them up automatically when the component unmounts or when the client reconnects.

Devtools Panel Features

Once connected, the Rozenite SQLite panel provides:

  • Database switcher — select from all registered databases
  • Table browser — list all user tables in the selected database
  • Data grid — paginated view of rows with column headers
  • Row detail panel — inspect all fields of a selected row
  • SQL console — run arbitrary SELECT (or any) queries against the selected database
  • Refresh — reload the current table data on demand

License

MIT