Create initial better-sqlite3 db wrapper module

This commit is contained in:
Starbeamrainbowlabs 2019-05-22 12:28:57 +01:00
parent 391f066521
commit d2a6170864
3 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,16 @@
"use strict";
import Database from 'batter-sqlite3';
var db_connection = null;
function init(filename, options) {
db_connection = new Database(filename, options);
}
function get_connection() {
return db_connection;
}
export { init, get_connection };

View file

@ -23,3 +23,5 @@ async function get_id_number() {
16 16
); );
} }
export { get_id_string, get_id_number };

View file

@ -0,0 +1,9 @@
"use strict";
class ReadingRepo {
constructor() {
}
}
export default ReadingRepo;