lib/sqlite-helper.js
function query (query, params) {
        let rows = [];
        let stmt = sql.prepare(query);
        params = normalizeParams(params);
        stmt.bind(params);
        while(stmt.step()) {
            rows.push(stmt.getAsObject());
        }
        stmt.free();
        return rows;
    }
function query (query, params) {
        let rows = [];
        let stmt = sql.prepare(query);
        params = normalizeParams(params);
        stmt.bind(params);
        while(stmt.step()) {
            rows.push(stmt.getAsObject());
        }
        stmt.free();
        return rows;
    }
function query ( query , params ) { let rows = [ ] ; let stmt = sql . prepare ( query ) ; params = normalizeParams ( params ) ; stmt . bind ( params ) ; while ( stmt . step ( ) ) { rows . push ( stmt . getAsObject ( ) ) ; } stmt . free ( ) ; return rows ; }
Executes a command returning the results.

@param query {string} the query string
@param params {[]|{}} the parameters to be bound to the query
@returns {[]} an array of rows
Executes a command returning the results .