loopback-node-arangodb
This module is designed for the Strongloop Loopback framework. It adds _id
attributes to any Model.
_id
A document handle uniquely identifies a document in the database. It is a string and consists of the collection's name and the document key (_key
attribute) separated by /.
INSTALL
npm install --save loopback-node-arangodb
MIXINSOURCES
With loopback-boot@v2.8.0 mixinSources have been implemented in a way which allows for loading this mixin without changes to the server.js
file previously required.
Add the mixins
property to your server/model-config.json
like the following:
CONFIG
To use with your Models add the mixins
attribute to the definition object of your model config.
BOOT OPTIONS
The attribute name _id
, is configurable. To use different values for the default attribute name add the following parameters to the mixin options.
In this example we change _id
, to completeId
respectively.
TESTING
This package uses jscs
and jshint
as pretests to help maintain style and for error checking.
Run the tests in the test
directory.
npm test
Run with debugging output on:
DEBUG='loopback:mixin:node-arangodb' npm test