ijsquery

1.0.2 • Public • Published
    const ijsquery = require("ijsquery");
    const jso = new ijsquery({ file: "./one.jsql", autosave: true });
    jso.create({
        name: `test1`,
        default: {
            name: `>name`,
            email: `>email`,
            online: true
        }
    });
    jso.insert({
        table: `test1`,
        rows: [
            { name: `jamie` },
            { name: `jamie` },
            { name: `jessie` }
        ]
    });
    const out = jso.query({
        table: `test1`,
        data: {}
    });
    console.log(out);
    /*
    [
        { name: "jamie", email: ">email", online: true, id: 0 },
        { name: "jamie", email: ">email", online: true, id: 1 },
        { name: "jessie", email: ">email", online: true, id: 2 }
    ]
    */
    jso.remove({
        table: "test1",
        data: {
            id: 1
        }
    });
    jso.update({
        table: `test1`,
        query: {
            online: true
        },
        data: {
            name: `joe`
        }
    });
    jso.delete({
        table: `test1`
    });
    console.log(jso.db);

Readme

Keywords

Package Sidebar

Install

npm i ijsquery

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • cryogena