1 changed files with 11 additions and 23 deletions
@ -1,29 +1,17 @@ |
|||||
import {systemRepo, userRepo, scoreRepo} from './dbInit'; |
import {systemRepo, userRepo, scoreRepo} from './dbInit'; |
||||
|
|
||||
class realmAPI { |
export function getAllSystemValues() { |
||||
constructor(){ |
|
||||
if (realmDB === null) { |
|
||||
realmDB = this; |
|
||||
} |
|
||||
|
|
||||
return realmDB; |
|
||||
} |
|
||||
|
|
||||
getAllSystemValues() { |
|
||||
return systemRepo.getAllSystemValues(); |
return systemRepo.getAllSystemValues(); |
||||
} |
} |
||||
|
|
||||
createSystemValue(key, value) { |
export function createSystemValue(key, value) { |
||||
systemRepo.createSystemValue(key, value); |
systemRepo.createSystemValue(key, value); |
||||
} |
} |
||||
|
|
||||
deleteSystemValue(key) { |
export function deleteSystemValue(key) { |
||||
systemRepo.deleteSystemValue(key); |
systemRepo.deleteSystemValue(key); |
||||
} |
} |
||||
|
|
||||
getSystemValue(key) { |
export function getSystemValue(key) { |
||||
return systemRepo.getSystemKeyValue(key); |
return systemRepo.getSystemKeyValue(key); |
||||
} |
} |
||||
} |
|
||||
|
|
||||
export let realmDB = new realmAPI(); |
|
Loading…
Reference in new issue