1.0.8 • Published 7 years ago

neo4j-redis v1.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Neo4j-redis

npm version npm

Neo4j-redis, a promised-based Neo4j transactions adapter which optionally supports caching using Redis.

Usage

const Neo4j = require('neo4j-redis');
let neo4j = new Neo4j();
neo4j.initGraphDB('http://127.0.0.1:7474', 'neo4j', 'password');

APIs

This module contains a core exported class Neo4j. In turn it also creates Transaction and QueryBuilder objects.

Core API

MethodDescriptionNotes
initGraphDBInitialize Neo4j Graph DatabaseRequired
initCacheDBInitialize Redis Database for cachingOnly used if caching is desired
createTransactionCreates a transaction objectSee Transaction API section
createQueryBuilderCreates a new query builder objectSee Query Build API section
getSimpleDataHelper to extra simple data responsesSimple data is defined as a single return value. A single object qualifies
toPropsConvert an object of properties to a property query string
toNamedPropsConverts a named object to a cypher compatible key / value pair
toSetsConverts an object to a cypher compatible list of set statements

Transaction API

MethodDescriptionNotes
addQueryAppends a query to the transaction's list of query statementsRequires a Query Builder object and params
cacheableMarks a transaction as cacheable
executeExecutes a transaction

Query Builder API

MethodDescriptionNotes
addAdds a partial query statement
toStringReturns the full query as a string

Tests

The specs folder contains tests.

To run the tests you first need to install mocha:

$ npm install mocha -g

Then run:

$ npm run test
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago