0.3.4 • Published 5 years ago

lightql v0.3.4

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

LightQL

Simple yet powerful SQLite3 wrapper for NodeJS

Install

npm install lightql

Usage

const lightql = require("lightql"); // initialize the module
const database = new lightql("testing"); // create a new database

// create a new table called users
database.addTable("users", { id: "INTEGER", name: "TEXT" });
// insert a new row into the users table
database.insert([0, "pyxel"], "users"); 
 // fetch all rows with an id of 0 and log them
database.fetch("id", 0, "users").then(rows => console.log(rows));
// update rows with a specific query
database.update("id", 0, { name: "new_name" }, "users");
// delete rows with a specific query
database.delete("id", 0, "users");
// delete a existing table in the database
database.dropTable("users");
// finally, close the database connection
database.close();

Notice: All functions except for close and fetch are serialized, they do not run in parallel
This module uses JSDoc allowing devs to easier use the lib

0.3.4

5 years ago

0.4.0

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.0

5 years ago