Realm Async Storage
Class for deal with Realm local DB similar to RN AsyncStorage
Usage
On the App.js
, import and give desired model list to setup.
;...const schemas = UserSchema CompanySchema;const onError = console; // optionalRealmStorage
Methods
- setup (schemas?: Array): any
- createItem (key: string, value: Object): Object
- updateItem (key: string, value: Object): Object
- deleteItem (item: RealmObject): Promise
- getItems (key: string, filter: Object | string): Promise<Array | null>
- removeAll (key: string): Promise
- convertFilter (filter: Object | string): string
- checkSchema (key: string)
- getAllKeys (): Promise<Array>
- getModel (): any