콘텐츠로 건너뛰기

@capgo/capacitor-fast-sql

Ultra-fast native SQLite with custom protocol for sync systems and large datasets

@capgo/capacitor-fast-sql is a high-performance native SQLite plugin that uses a custom HTTP-based communication protocol to bypass Capacitor’s standard bridge, delivering up to 25x faster performance for large datasets and sync operations.

Why Fast SQL?

Traditional Capacitor plugins serialize data through the JavaScript bridge, which becomes inefficient with large datasets. Fast SQL solves this by establishing a local HTTP server for direct native communication, making it ideal for:

  • Local-first sync systems (CRDTs, operational transforms)
  • IndexedDB replacement on platforms with broken/limited implementations
  • Large dataset operations requiring high throughput
  • Batch operations with thousands of rows
  • Binary data storage (BLOBs, files)

Key Features

Custom HTTP Protocol

Bypasses Capacitor’s bridge for up to 25x faster performance with large data transfers

Full SQLite Support

Complete SQL support with transactions, batch operations, and binary data handling

Sync-Friendly

Designed for local sync systems like CRDTs and operational transforms

Cross-Platform

iOS, Android, and Web (using sql.js + IndexedDB for persistence)

Transaction Support

ACID transactions with configurable isolation levels

Binary Data

Native support for Uint8Array/BLOB storage

Performance

Fast SQL uses a custom HTTP protocol inspired by capacitor-blob-writer that eliminates serialization overhead:

  • 25x faster for large batch operations
  • Direct binary transfer without base64 encoding
  • Efficient memory usage for streaming large results
  • Local HTTP server on iOS/Android for optimal throughput

Use Cases

Local-First Applications

Build apps that work offline-first with efficient sync capabilities:

  • CouchDB/PouchDB-style replication
  • Operational transform systems
  • CRDT-based collaboration tools

IndexedDB Replacement

Replace unreliable IndexedDB implementations with native SQLite:

  • Cross-platform consistency
  • Better performance on mobile
  • Reliable transactions and data integrity

High-Performance Data

Handle large datasets efficiently:

  • Analytics and reporting
  • Import/export operations
  • Data migration tools
  • Scientific data collection

Next Steps