SQLite wrapper for database-js
Database-js-mysql is a wrapper around the node-sqlite3 package. It is intended to be used with the database-js package.
varDatabase=require('database-js2').Connection;(async()=>{letconnection,statement,rows;connection=newDatabase('sqlite:///test.sqlite');try{statement=awaitconnection.prepareStatement("SELECT * FROM tablea WHERE user_name = ?");rows=awaitstatement.query('not_so_secret_user');console.log(rows);}catch(error){console.log(error);}finally{awaitconnection.close();}})();The original sql.js package can still be used as well. Pass "driver=sql.js" in the connection parameter string. e.g.
connection=newDatabase('sqlite:///test.sqlite?driver=sql.js');