Create initial better-sqlite3 db wrapper module

master
Starbeamrainbowlabs 4 years ago
parent 391f066521
commit d2a6170864
  1. 16
      server/Helpers/Database.mjs
  2. 2
      server/Helpers/IdGenerator.mjs
  3. 9
      server/Repos.SQLite/ReadingRepo.mjs

@ -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 };

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

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