0.1.4 • Published 6 years ago

@app-masters/realm-async-storage v0.1.4

Weekly downloads
52
License
-
Repository
github
Last release
6 years ago

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.

import {RealmStorage} from 'realm-async-storage';
...
const schemas = [UserSchema, CompanySchema]; // Realm schemas
const onError = (error) => console.error(error); // optional
RealmStorage.setup(schemas, onError)

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

Using

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago