1.0.4 • Published 1 year ago

mylocaldatabase v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Get Started

Installation

install mylocaldatabase with npm or yarn

npm i mylocaldatabase

or

yarn add mylocaldatabase

this is example of creating schemas with mylocaldatabase

import {MyLocalDatabase} from 'mylocaldatabase';

const my_collection = MyLocalDatabase.collection('test');

const my_schema = MyLocalDatabase.schema({
  name: String,
  age: Number,
});

my_collection.insert(
    {
      name: 'Jack',
      age: 12,
    },
    my_schema,
    (success) => // Success,
    (error) => console.error(error)
);

This package helps you in:

  • Having simple storage

  • Create Schema and use them

  • Type cheking for schemas

  • Async workflow

  • Integrated with async storage

  • Save and use Json objects

  • Built in searching api

Current api's:

  • Collection

  • Schema

  • Insert

  • removeItem

  • removeItems

  • getItem

  • getItems

  • clearCollection

  • getAll

  • Multiple insert