Socket
Socket
Sign inDemoInstall

@codewithkyle/jsql

Package Overview
Dependencies
0
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @codewithkyle/jsql

Asynchronously access and manage your IndexedDB databases using SQL queries.


Version published
Maintainers
1
Install size
62.4 kB
Created

Readme

Source

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));

FAQs

Last updated on 05 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc