Browse Source

setup db API

pull/1/head
Tim Glasgow 2 years ago
parent
commit
c2e3bd4f00
  1. 27
      squarenotsquare/realm/dbAPI.js

27
squarenotsquare/realm/dbAPI.js

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