1.0.2 • Published 1 year ago

sqlite-manager-async v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Example:

const fs=require('fs-extra);
const SqliteManager = require('sqlite-manager-async');

async function main(){
    const dbPath = path.resolve(__dirname, '../.database');
    fs.ensureDirSync(dbPath);
    const db = new SqliteManager(path.resolve(dbPath, 'data.db'));

    await db.run(`
        CREATE TABLE IF NOT EXISTS posts(
            id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
            status NVARCHAR(20),
            title NVARCHAR(255) NOT NULL)`);
    const res = await db.all(`SELECT * FROM posts`);

    console.log(res);
}
main();
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

2 years ago