const fs = require('fs');
const initSqlJs = require('sql.js');

initSqlJs().then(SQL => {
    const fileBuffer = fs.readFileSync('data/worktime.db');
    const db = new SQL.Database(fileBuffer);
    const res = db.exec("SELECT sql FROM sqlite_master WHERE name='timesheets'");
    console.log(res[0].values[0][0]);
});
