I'm not sure if this is doable, so I was wondering if, before I dive down the rabbit-hole, someone else has some idea.
I want to write something and access some SQLite data from within the js. Something like this:
=Start=
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:');
db.serialize(function() {
db.run("CREATE TABLE lorem (info TEXT)");
var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
for (var i = 0; i < 10; i++) {
stmt.run("Ipsum " + i);
}
stmt.finalize();
db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
console.log(row.id + ": " + row.info);
});
});
db.close();
hi John, several year ago i wrote a simple patch to sbbs code to get sqlite databases object in JS (very very very simple)
the patch is out of date now, but maybe you can patch against to actual git code. Its no for production environment, just a test.
if i get free time maybe i try patching over current code.
hi John, several year ago i wrote a simple patch to sbbs code to get
sqlite databases object in JS (very very very simple)
the patch is out of date now, but maybe you can patch against to actual
git code. Its no for production environment, just a test.
http://downloads.bbs.docksud.com.ar/sync/js_sqlite/
if i get free time maybe i try patching over current code.
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 578 |
Nodes: | 8 (0 / 8) |
Uptime: | 29:20:43 |
Calls: | 10,736 |
Calls today: | 1 |
Files: | 5 |
Messages: | 443,196 |
Posted today: | 1 |