A promise-based wrapper for Web SQL and Cordova SQLite databases (v0.0.1-pre03). This library allows developers to execute SQL statements in batch transactions and chain operations using Promises, simplifying asynchronous database handling. It supports both the standard Web SQL interface (window.openDatabase) and the Cordova SQLite plugin (window.sqlitePlugin). The package is in pre-release stage and depends on the standard Promise object (polyfill required for older environments). It differentiates from other SQL promise libraries by focusing on batch transaction support with a simple, minimal API.
npm install sql-promise-helperNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a database, constructing a promise helper, executing batch statements, committing, and querying results using Promises.
Include a Promise polyfill like 'es6-promise' or 'promise-polyfill' before using this library.
Use Cordova SQLite plugin via 'window.sqlitePlugin.openDatabase' instead of 'window.openDatabase'.
Use import { newPromiseHelper } from 'sql-promise-helper' or const { newPromiseHelper } = require('sql-promise-helper').Ensure the argument is a valid Web SQL or Cordova SQLite database instance.
Use const { newPromiseHelper } = require('sql-promise-helper');Add a Promise polyfill before using this library.
Verify that newPromiseHelper(db) receives a valid database instance.