how to access to the zotero.sqlite using javascript?
https://www.zotero.org/support/dev/client_coding/direct_sqlite_database_access mentions zotero.sqlite database could be accessed. I would like to know which functions should be used to get the attachment items paths in zotero.sqlite database.
Could the codes in https://github.com/sql-js/sql.js be used?
Could the codes in https://github.com/sql-js/sql.js be used?
var fs = require('fs');
var initSqlJs = require('sql-wasm.js');
var filebuffer = fs.readFileSync('test.sqlite');
initSqlJs().then(function(SQL){
// Load the db
var db = new SQL.Database(filebuffer);
});
If you mean from outside of Zotero, that's a general programming question, and you should ask in a general programming forum.
I would like to run it in JavaScript window.