@codewithkyle/jsql
TypeScript icon, indicating that this package has built-in type declarations

1.3.5 • Public • Published

JSQL

Access IndexedDB with SQL.

Installation

Install via NPM

npm i -S @codewithkyle/jsql

Install via CDN

import db from "https://unpkg.com/@codewithkyle/jsql@1/jsql.js";

Getting Started

import db from "https://unpkg.com/@codewithkyle/jsql@1/jsql.js";
db.start();

Hint: read the setup guide for additional details and configuration options.

Writing Queries

Insert data into IndexedDB

db.query("INSERT INTO users VALUES ($user1, $user2)", {
    user1: {
        name: "Frank",
        email: "franky123@example.com",
    },
    user2: {
        name: "April Summers",
        email: "popartfan18@example.com",
    }
});

Query data from IndexedDB

const users = await db.query("SELECT * FROM users LIMIT 10")
users.map(user => console.log(user));

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i @codewithkyle/jsql

    Weekly Downloads

    0

    Version

    1.3.5

    License

    MIT

    Unpacked Size

    63.9 kB

    Total Files

    7

    Last publish

    Collaborators

    • codewithkyle