npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

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

install

npm i ijsquery

Downloadsweekly downloads

10

version

1.0.2

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability