nosqwal-orientdb

Nosqwal adapter for Orientdb

Usage no npm install needed!

<script type="module">
  import nosqwalOrientdb from 'https://cdn.skypack.dev/nosqwal-orientdb';
</script>

README

nosqwal-orientdb Build Status Coverage Status

Nosqwal adapter for Orientdb

Install

$ npm install --save nosqwal-orientdb

Usage

const nosqwalOrientdb = require('nosqwal-orientdb');
const db = nosqwalOrientdb();

const userCollection = db.defineCollection('user');

userCollection.create({
    username: 'Alice',
    password: '*****'
})
.then(alice => {
    return userCollection.query(
        where: {
            username: {
                $eq: 'Alice'
            }
        },
        limit: 1
    });
})
.then(users => {
    console.log(users[0].username);
    //=> 'Alice'
});

API

nosqwalOrientdb([options])

Retuns a noSqwal instance, see api here

options.host

Type: string
Default: localhost

Hostname of the server

options.port

Type: number
Default: 2424

Port of the server

options.dbName

Type: string
Default: default

Database name

options.user

Type: string
Default: admin

Username to connect to the database

options.password

Type: string
Default: admin

Password to connect to the database

License

MIT © Thomas Sileghem