Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alvilio/realm-orm

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alvilio/realm-orm

It is orm to work with realm data bases

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

realm-orm

It is orm to work with realm data bases

How use

1- Define your model

import { Model } from "@alvilio/realm-orm/dist";

const Category = {
  name: "Category",
  properties: {
    name: "string",
    color: "string"
  }
};

export default Model(Category);

2- Use methods

import { Category } from "myModels";

const category = {
  name: "foo",
  color: "red"
};

Category.instance()
  .save(category)
  .then(() => {
    // Succes response
  })
  .catch(error => {
    // Fail response
  });

Methods

Model class

Name

Description

Params
deleteDelete one or more itemsids, string or string id array of items to delete
findByIdFind a model by idid, string
findFind a modelfilter, realm string filter
saveSave or update a model, if model has id property then update else createmodel, object value of the model

Keywords

FAQs

Package last updated on 22 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc