An open API service indexing awesome lists of open source software.

https://github.com/mastilver/nosqwal-orientdb

Nosqwal adapter for Orientdb
https://github.com/mastilver/nosqwal-orientdb

Last synced: about 1 month ago
JSON representation

Nosqwal adapter for Orientdb

Awesome Lists containing this project

README

          

# nosqwal-orientdb [![Build Status](https://travis-ci.org/mastilver/nosqwal-orientdb.svg?branch=master)](https://travis-ci.org/mastilver/nosqwal-orientdb) [![Coverage Status](https://coveralls.io/repos/github/mastilver/nosqwal-orientdb/badge.svg?branch=master)](https://coveralls.io/github/mastilver/nosqwal-orientdb?branch=master)

> [Nosqwal](https://github.com/mastilver/nosqwal) adapter for Orientdb

## Install

```
$ npm install --save nosqwal-orientdb
```

## Usage

```js
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](https://github.com/mastilver/nosqwal#api)

#### 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](http://mastilver.com)