0.1.602 • Published 6 years ago
vsqlite v0.1.602
VSqlite
A Node package to generate ineract with sqlite without knowing any sql. Its a wrapper that allows you to not need to know any sql.
Installation
npm i vsqlite
Use
const DataBase = require("vsqlite")
let db = new DataBase();
let dataBase = db.open("test");
let tableList = await dataBase.listTables().map(v => v.name);
let table = await db.create("newTable", {name: "john", id: '423178321'});
await table.write(["name","id"], ["Johnny", "83213213"]);
let res = await table.read();
console.log(res);
or
const DataBase = require("vsqlite")
let db = new DataBase();
db.open("test").then(dataBase => {
let tableList = await dataBase.listTables().map(v => v.name);
db.create("newTable", {name: "john", id: '423178321'}).then(table => {
table.write(["name","id"], ["Johnny", "83213213"]);
table.read().then(console.log);
})
})
Contact
Licence
This software is licenced under the GNU LGPLv3 Licence