1.1.6 • Published 7 years ago

neo4j-qb v1.1.6

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

Neo4J Query builder

Written in ES5 for older nodejs version support.

npm install neo4j-qb

Usage

var Neo = require('neo4j-qb');
var qb = Neo(host, username, password, options);

options.connectionPoolSize: Size of the connection pool.

Insert

// CREATE (:User {name: 'Jhon'})
qb.insert({ name: 'Jhon' }, 'User').then(...)
// MERGE (:User {name: 'Jhon'})
qb.upsert(null, { name: 'Jhon' }, 'User').then(...);
// MERGE (n:User {name: 'Jhon'}) ON CREATE SET n.email = 'jhon@example.com' ON MATCH SET n.email = 'jhon@example.com'
qb.upsert({ email: 'jhon@example.com' }, { name: 'Jhon' }, 'User').then(...);

Match

// MATCH (u:User {id: 1}) RETURN n.id
qb.match('User', { id: 1 }, 'u').fetch('n.id').then(...);

// MATCH (u:User)-[f:FRIEND_OF]->(u2:User) WHERE u.name = 'Jhon' RETURN f.since
qb.path(function (q) {
  q.node('User', 'u').rrel('FRIEND_OF', 'f').node('User', 'u2');
})
.where('u.name', '=', 'Jhon')
.fetch('f.since');
1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

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