Browse Source

remove class structure for db api

pull/1/head
Tim Glasgow 2 years ago
parent
commit
f5dae50a5c
  1. 34
      squarenotsquare/src/realm/dbAPI.js

34
squarenotsquare/src/realm/dbAPI.js

@ -1,29 +1,17 @@
import {systemRepo, userRepo, scoreRepo} from './dbInit';
class realmAPI {
constructor(){
if (realmDB === null) {
realmDB = this;
}
return realmDB;
}
getAllSystemValues() {
return systemRepo.getAllSystemValues();
}
export function getAllSystemValues() {
return systemRepo.getAllSystemValues();
}
createSystemValue(key, value) {
systemRepo.createSystemValue(key, value);
}
deleteSystemValue(key) {
systemRepo.deleteSystemValue(key);
}
export function createSystemValue(key, value) {
systemRepo.createSystemValue(key, value);
}
getSystemValue(key) {
return systemRepo.getSystemKeyValue(key);
}
export function deleteSystemValue(key) {
systemRepo.deleteSystemValue(key);
}
export let realmDB = new realmAPI();
export function getSystemValue(key) {
return systemRepo.getSystemKeyValue(key);
}
Loading…
Cancel
Save