Skip to content

@capgo/capacitor-fast-sql

Fast SQL Plugin for high-performance SQLite database access.

Fast SQL Plugin for high-performance SQLite database access.

  • connect - Initialize the database connection and start the HTTP server.
  • disconnect - Close database connection and stop the HTTP server.
  • getServerInfo - Get the HTTP server port and token for direct communication.
  • execute - Execute a SQL query via Capacitor bridge (for simple queries). For better performance with large datasets, use the HTTP protocol directly via SQLConnection class.
MethodDescription
connectInitialize the database connection and start the HTTP server.
disconnectClose database connection and stop the HTTP server.
getServerInfoGet the HTTP server port and token for direct communication.
executeExecute a SQL query via Capacitor bridge (for simple queries). For better performance with large datasets, use the HTTP protocol directly via SQLConnection class.
beginTransactionBegin a database transaction.
commitTransactionCommit the current transaction.
rollbackTransactionRollback the current transaction.
getPluginVersionGet the native Capacitor plugin version.
configureWebConfigure web-specific options for the sql.js WASM module.

This reference is synced from src/definitions.ts in capacitor-fast-sql.

If you are using @capgo/capacitor-fast-sql to plan storage and file handling, connect it with Using @capgo/capacitor-fast-sql for the native capability in Using @capgo/capacitor-fast-sql, @capgo/capacitor-data-storage-sqlite for the implementation detail in @capgo/capacitor-data-storage-sqlite, Using @capgo/capacitor-data-storage-sqlite for the native capability in Using @capgo/capacitor-data-storage-sqlite, @capgo/capacitor-file for the implementation detail in @capgo/capacitor-file, and Using @capgo/capacitor-file for the native capability in Using @capgo/capacitor-file.