nuagedb-client

2.1.3 • Public • Published

Introduction

The nuagedb-client lets you communicate with the nuagedb-service API.

Installation

For nodejs,

npm i nuagedb-client

For browser,

<script src="https://rawgit.com/kawanet/msgpack-lite/master/dist/msgpack.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/nuagedb-client/NuageDBClient.min.js"></script>

Getting started

// Configure the connector
NuageDBClient.accessToken = 'xxx';     // define your access token
NuageDBClient.host = 'ge.galmiza.net'; // define API endpoint

// Instanciate the connector and run your query
var g = new NuageDBClient();             // connect to the graph engine service
g.V().count().done(console.log);         // run your first query (with callback)
console.log(await g.V().count().done()); // run your first query (with await)

Basic usage

// Add vertices in the graph
g.addV({id:"john",label:"User",age:34}).done(console.log);
g.addV([{id:"lila",label:"User",age:25},
        {id:"lena",label:"User",age:26}]).done(console.log);

// Read a vertex
g.V("lena").done(console.log);

// Add an edge between vertices
g.addE({in:"john",label:"knows",out:"lena"}).done(console.log);

// Search who knows lena
g.V("lena").in("knows").done(console.log);

Readme

Keywords

none

Package Sidebar

Install

npm i nuagedb-client

Weekly Downloads

0

Version

2.1.3

License

MIT

Unpacked Size

13.5 kB

Total Files

4

Last publish

Collaborators

  • galmiza