How to use the sqlite3.OPEN_READ function in sqlite3

To help you get started, we’ve selected a few sqlite3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github valentingalea / vinyl-shelf-finder / app / src / sqlite.js View on Github external
db.select_all = function(callback) {
    const sqlite = new sqlite3.Database(location, sqlite3.OPEN_READ, handler);
    if (!sqlite) return;

    sqlite.all("SELECT * FROM history ORDER BY timestamp ASC;", function(err, rows){
        if (err) {
            res.send(err);
            return;
        }
        callback(rows);
    });

    sqlite.close(handler);
};

sqlite3

Asynchronous, non-blocking SQLite3 bindings

BSD-3-Clause
Latest version published 11 months ago

Package Health Score

81 / 100
Full package analysis