1.0.1 • Published 8 years ago

realm-model v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

RealmModel

Simple realm wrapper.

Build Status Test Coverage Code Climate Dependency Status npm

Install

npm install realm-model

Usage

sample here

Example

'use strict';

const RealmModel = require('realm-model');

class UserModel extends RealmModel {
    model() {
        this.schema = {
            name: 'User',
            primaryKey: 'id',
            properties: {
                id   : 'int',
                name : 'string',
            }
        };
    }
}

let userModel = new UserModel();
userModel.save({id: 1, name: 'test'});
let datas = userModel.get();
console.log(datas);
1.0.1

8 years ago

1.0.0

8 years ago

0.1.0

8 years ago

0.0.5

8 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago