cypher-stream
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -33,3 +33,6 @@ var oboe = require('oboe'); | ||
.fail(function(error) { | ||
stream.emit('error', error); | ||
var err = new Error('Query failure: '+error.jsonBody.message); | ||
err.neo4j = error.jsonBody; | ||
err.neo4j.statusCode = error.statusCode; | ||
stream.emit('error', err); | ||
stream.push(null); | ||
@@ -36,0 +39,0 @@ }); |
{ | ||
"name": "cypher-stream", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Streams cypher query results in a clean format", | ||
@@ -25,8 +25,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"oboe": "~1.12.2" | ||
"oboe": "~1.14.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.17.1", | ||
"should": "~3.1.2" | ||
"should": "~3.1.3" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# cypher-stream [![NPM version](https://badge.fury.io/js/cypher-stream.png)](http://badge.fury.io/js/cypher-stream) [![devDependency Status](https://david-dm.org/brian-gates/cypher-stream.png?theme=shields.io)](https://david-dm.org/brian-gates/cypher-stream.png#info=devDependencies) | ||
# cypher-stream [![Build Status](https://travis-ci.org/brian-gates/cypher-stream.png?branch=master)](https://travis-ci.org/brian-gates/cypher-stream) [![NPM version](https://badge.fury.io/js/cypher-stream.png)](http://badge.fury.io/js/cypher-stream) [![devDependency Status](https://david-dm.org/brian-gates/cypher-stream.png?theme=shields.io)](https://david-dm.org/brian-gates/cypher-stream.png#info=devDependencies) | ||
@@ -41,2 +41,2 @@ Neo4j cypher queries as node object streams. | ||
``` | ||
``` |
@@ -8,2 +8,5 @@ var should = require('should'); | ||
.on('end', done) | ||
.on('error', function (error){ | ||
console.error(error); | ||
}) | ||
.resume(); | ||
@@ -34,8 +37,8 @@ }); | ||
cypher('invalid query') | ||
.on('data', function (data){ | ||
console.log(data); | ||
}) | ||
.on('error', function (error) { | ||
errored = true; | ||
error.statusCode.should.eql(400); | ||
String(error).should.equal('Error: Query failure: Invalid input \'i\': expected SingleStatement (line 1, column 1)\n"invalid query"\n ^'); | ||
error.neo4j.exception.should.equal('SyntaxException'); | ||
error.neo4j.stacktrace.should.be.an.array; | ||
error.neo4j.statusCode.should.equal(400); | ||
}) | ||
@@ -46,2 +49,3 @@ .on('end', function() { | ||
}) | ||
.resume() // need to manually start it since we have no on('data') | ||
; | ||
@@ -48,0 +52,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16520
89
41
+ Addedhttp-https@1.0.0(transitive)
+ Addedoboe@1.14.7(transitive)
- Removedclarinet@0.8.1(transitive)
- Removedoboe@1.12.4(transitive)
Updatedoboe@~1.14.0