diff --git a/squarenotsquare/realm/dbAPI.js b/squarenotsquare/realm/dbAPI.js new file mode 100644 index 0000000..6f5e46e --- /dev/null +++ b/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); + } +} \ No newline at end of file