How to use the jsstore.useSqlWeb function in jsstore

To help you get started, we’ve selected a few jsstore 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 ujjwalguptaofficial / sqlweb / examples / webpack / src / service / idb_service.js View on Github external
import * as JsStore from 'jsstore';
import * as SqlWeb from "sqlweb";
const getWorkerPath = () => {
    if (process.env.NODE_ENV === 'development') {
        return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.js");
    }
    else {
        return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.min.js");
    }
};

JsStore.useSqlWeb(SqlWeb);

// This will ensure that we are using only one instance. 
// Otherwise due to multiple instance multiple worker will be created.
const workerPath = getWorkerPath();
const worker = new Worker(workerPath);
export const con = new JsStore.Instance(worker);
github ujjwalguptaofficial / sqlweb / examples / react / src / service / idb_service.js View on Github external
import * as JsStore from 'jsstore';
import * as SqlWeb from "sqlweb";
const getWorkerPath = () => {
    if (process.env.NODE_ENV === 'development') {
        return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.js");
    }
    else {
        return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.min.js");
    }
};

JsStore.useSqlWeb(SqlWeb);

// This will ensure that we are using only one instance. 
// Otherwise due to multiple instance multiple worker will be created.
const workerPath = getWorkerPath();
const worker = new Worker(workerPath);
export const idbCon = new JsStore.Instance(worker);
github ujjwalguptaofficial / sqlweb / examples / typescript / src / code / service / idb_helper.ts View on Github external
import * as SqlWeb from 'sqlweb';
import * as JsStore from 'jsstore';
import * as workerPath from "file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.js";

JsStore.useSqlWeb(SqlWeb);

// This will ensure that we are using only one instance. 
// Otherwise due to multiple instance multiple worker will be created.
export const con = new JsStore.Instance(new Worker(workerPath));

jsstore

Harness the power of JsStore to streamline database operations in your web applications. With its SQL-like API, JsStore simplifies IndexedDB interactions, enabling developers to easily query, filter, and manipulate data with familiar syntax and efficiency

MIT
Latest version published 1 month ago

Package Health Score

71 / 100
Full package analysis