How to use the websql/custom function in websql

To help you get started, we’ve selected a few websql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github axemclion / IndexedDBShim / src / nodeWebSQL.js View on Github external
function wrappedSQLiteDatabase (name) {
    const db = new SQLiteDatabase(name);
    if (CFG.sqlBusyTimeout) {
        db._db.configure('busyTimeout', CFG.sqlBusyTimeout); // Default is 1000
    }
    if (CFG.sqlTrace) {
        db._db.configure('trace', CFG.sqlTrace);
    }
    if (CFG.sqlProfile) {
        db._db.configure('profile', CFG.sqlProfile);
    }
    return db;
}

const nodeWebSQL = customOpenDatabase(wrappedSQLiteDatabase);
export default nodeWebSQL;
github craftzdog / react-native-sqlite-2 / src / index.js View on Github external
import customOpenDatabase from 'websql/custom'
import SQLiteDatabase from './SQLiteDatabase'

var openDB = customOpenDatabase(SQLiteDatabase)

function SQLitePlugin() {}

function openDatabase(name, version, description, size, callback) {
  if (name && typeof name === 'object') {
    // accept SQLite Plugin 1-style object here
    callback = version
    size = name.size
    description = name.description
    version = name.version
    name = name.name
  }
  if (!size) {
    size = 1
  }
  if (!description) {
github nolanlawson / cordova-plugin-sqlite-2 / src / javascript / index.js View on Github external
import customOpenDatabase from 'websql/custom';
import SQLiteDatabase from './SQLiteDatabase';

var openDB = customOpenDatabase(SQLiteDatabase);

function SQLitePlugin() {
}

function openDatabase(name, version, description, size, callback) {
  if (name && typeof name === 'object') {
    // accept SQLite Plugin 1-style object here
    callback = version;
    size = name.size;
    description = name.description;
    version = name.version;
    name = name.name;
  }
  if (!size) {
    size = 1;
  }

websql

WebSQL Database API, implemented for Node using sqlite3

Apache-2.0
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis