The following works:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'a.db', true);
xhr.responseType = 'arraybuffer';
xhr.onload = function(e) {
var uInt8Array = new Uint8Array(this.response);
var db = new SQL.Database(uInt8Array);
var contents = db.exec("SELECT * FROM listing");
console.log(contents[0]);
};
But this doesn't:
db.run(".mode csv");
db.run(".output out.csv");
Error message:
Uncaught Error: near ".": syntax error
Aucun commentaire:
Enregistrer un commentaire