1.0.16 • Published 5 years ago

rdf-orm v1.0.16

Weekly downloads
1
License
ISC
Repository
github
Last release
5 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

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago