Create initial better-sqlite3 db wrapper module
This commit is contained in:
parent
391f066521
commit
d2a6170864
3 changed files with 27 additions and 0 deletions
16
server/Helpers/Database.mjs
Normal file
16
server/Helpers/Database.mjs
Normal 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 };
|
|
@ -23,3 +23,5 @@ async function get_id_number() {
|
|||
16
|
||||
);
|
||||
}
|
||||
|
||||
export { get_id_string, get_id_number };
|
||||
|
|
9
server/Repos.SQLite/ReadingRepo.mjs
Normal file
9
server/Repos.SQLite/ReadingRepo.mjs
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
class ReadingRepo {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default ReadingRepo;
|
Loading…
Reference in a new issue