1.0.16 • Published 7 years ago

rdf-orm v1.0.16

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

Object Relation Mapping for RDF

Wrapper for RDF database

Installation

NPM

npm i -s rdf-orm

Yarn

yarn add rdf-orm

##Initializae connection

import {initConnection} from 'rdf-orm';
initConnection({baseUrl: 'http://localhost:3030/123'});

Define a Data Model

import {Model} from 'rdf-orm';
class Post extends Model{
    table='posts';
}

Create new Record

const post:Post|any = new Post;
post.title = "Sample post";
post.save();

Retrive Record by ID

const post:Post|any =await Post.find(<post_id>);
console.log(post);

Delete a Record

const post:Post|any =await Post.find(<post_id>);
post.delete();

Get all Records

const posts:Post|any =await Post.all();
console.log(posts);
1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago