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

@aiao/rxdb-adapter-sqlite

v0.0.28

Published

Official SQLite WASM adapter for Aiao RxDB.

Readme

@aiao/rxdb-adapter-sqlite

@aiao/rxdb 的官方 SQLite 适配器,基于 SQLite 官方 WASM 构建,为核心引擎提供 SQLite 存储后端。

安装

pnpm add @aiao/rxdb @aiao/rxdb-adapter-sqlite rxjs

用法

import { createSqliteClient, RxDBAdapterSqlite } from '@aiao/rxdb-adapter-sqlite';
  • createSqliteClient:创建 SQLite 客户端
  • RxDBAdapterSqlite:接入 @aiao/rxdb 的适配器实现
  • sqliteLoad / resetSqliteLoadCache:WASM 加载与缓存控制
  • 类型:SqliteOptions、SqliteLoadOptions、SqliteRepositoryConstructor 等

适配器共享内核(表名解析、规则编译、基础 Repository)来自 @aiao/rxdb-adapter-sqlite-core。

备份与恢复

backup() / restore() / cleanupIncompleteRestore() 由 @aiao/rxdb-adapter-sqlite-core 提供,语义与错误码见那里。

| 配置 | 备份 / 恢复 | | ------------------------------------ | ----------------------------------------------------------------------------------------- | | 不开 opfs | ✅ 内存库 | | opfs: true | ✅ OPFS,持久化 journal_mode 为 delete | | opfs: true, opfsFallback: 'memory' | ❌ unsupported_combination(opfsFallback):OPFS 打不开时静默落到内存,恢复目标不确定 |

在 Worker 里跑时,每次连接租用 Worker 的一条独立子端口:恢复用一条连接写库,之后的 connect() 在同一个 Worker 上再开一条。 同一个 workerInstance 同一时间只借给一条连接:第二条并发连接会抛 Worker transport already has an active SQLite client。 直接调用 createSqliteClient 时,先 await client.disconnect(),再调用 @aiao/rxdb-adapter-sqlite-core 导出的 releaseComlinkProxy(client) 归还子端口,之后才能在同一个 Worker 上重连;适配器已在 disconnect() 内自动完成这一步。

文档

License

MIT