Skip to content

Commit

Permalink
JS driver v1.4.0-rc1: Checking in transpiled files for bower
Browse files Browse the repository at this point in the history
  • Loading branch information
lutovich committed Jun 29, 2017
1 parent 4d628f5 commit 20653c5
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 48 deletions.
26 changes: 15 additions & 11 deletions lib/browser/neo4j-web.js
Original file line number Diff line number Diff line change
Expand Up @@ -27919,6 +27919,7 @@ var Neo4jError = function (_Error) {

_this.message = message;
_this.code = code;
_this.name = "Neo4jError";
return _this;
}

Expand Down Expand Up @@ -31351,7 +31352,7 @@ var ConnectionHolder = function () {

/**
* Notify this holder that single party does not require current connection any more.
* @return {Promise<Connection>} promise resolved with the current connection.
* @return {Promise<Connection>} promise resolved with the current connection, never a rejected promise.
*/

}, {
Expand Down Expand Up @@ -35430,10 +35431,6 @@ var _connectionHolder = require('./internal/connection-holder');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
* A stream of {@link Record} representing the result of a statement.
* @access public
*/
/**
* Copyright (c) 2002-2017 "Neo Technology,","
* Network Engine for Objects in Lund AB [http://neotechnology.com]
Expand All @@ -35453,6 +35450,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* limitations under the License.
*/

var DEFAULT_ON_ERROR = function DEFAULT_ON_ERROR(error) {
console.log('Uncaught error when processing result: ' + error);
};
var DEFAULT_ON_COMPLETED = function DEFAULT_ON_COMPLETED(summary) {};

/**
* A stream of {@link Record} representing the result of a statement.
* @access public
*/

var Result = function () {
/**
* Inject the observer to be used.
Expand Down Expand Up @@ -35554,10 +35561,10 @@ var Result = function () {
value: function subscribe(observer) {
var _this = this;

var onCompletedOriginal = observer.onCompleted;
var self = this;
var onCompletedWrapper = function onCompletedWrapper(metadata) {

var onCompletedOriginal = observer.onCompleted || DEFAULT_ON_COMPLETED;
var onCompletedWrapper = function onCompletedWrapper(metadata) {
var additionalMeta = self._metaSupplier();
for (var key in additionalMeta) {
if (additionalMeta.hasOwnProperty(key)) {
Expand All @@ -35574,10 +35581,7 @@ var Result = function () {
};
observer.onCompleted = onCompletedWrapper;

var onErrorOriginal = observer.onError || function (error) {
console.log("Uncaught error when processing result: " + error);
};

var onErrorOriginal = observer.onError || DEFAULT_ON_ERROR;
var onErrorWrapper = function onErrorWrapper(error) {
// notify connection holder that the used connection is not needed any more because error happened
// and result can't bee consumed any further; call the original onError callback after that
Expand Down
6 changes: 3 additions & 3 deletions lib/browser/neo4j-web.min.js

Large diffs are not rendered by default.

67 changes: 44 additions & 23 deletions lib/browser/neo4j-web.test.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/v1/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ var Neo4jError = function (_Error) {

_this.message = message;
_this.code = code;
_this.name = "Neo4jError";
return _this;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/v1/internal/connection-holder.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var ConnectionHolder = function () {

/**
* Notify this holder that single party does not require current connection any more.
* @return {Promise<Connection>} promise resolved with the current connection.
* @return {Promise<Connection>} promise resolved with the current connection, never a rejected promise.
*/

}, {
Expand Down
23 changes: 13 additions & 10 deletions lib/v1/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ var _connectionHolder = require('./internal/connection-holder');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
* A stream of {@link Record} representing the result of a statement.
* @access public
*/
/**
* Copyright (c) 2002-2017 "Neo Technology,","
* Network Engine for Objects in Lund AB [http://neotechnology.com]
Expand All @@ -47,6 +43,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* limitations under the License.
*/

var DEFAULT_ON_ERROR = function DEFAULT_ON_ERROR(error) {
console.log('Uncaught error when processing result: ' + error);
};
var DEFAULT_ON_COMPLETED = function DEFAULT_ON_COMPLETED(summary) {};

/**
* A stream of {@link Record} representing the result of a statement.
* @access public
*/

var Result = function () {
/**
* Inject the observer to be used.
Expand Down Expand Up @@ -148,10 +154,10 @@ var Result = function () {
value: function subscribe(observer) {
var _this = this;

var onCompletedOriginal = observer.onCompleted;
var self = this;
var onCompletedWrapper = function onCompletedWrapper(metadata) {

var onCompletedOriginal = observer.onCompleted || DEFAULT_ON_COMPLETED;
var onCompletedWrapper = function onCompletedWrapper(metadata) {
var additionalMeta = self._metaSupplier();
for (var key in additionalMeta) {
if (additionalMeta.hasOwnProperty(key)) {
Expand All @@ -168,10 +174,7 @@ var Result = function () {
};
observer.onCompleted = onCompletedWrapper;

var onErrorOriginal = observer.onError || function (error) {
console.log("Uncaught error when processing result: " + error);
};

var onErrorOriginal = observer.onError || DEFAULT_ON_ERROR;
var onErrorWrapper = function onErrorWrapper(error) {
// notify connection holder that the used connection is not needed any more because error happened
// and result can't bee consumed any further; call the original onError callback after that
Expand Down

0 comments on commit 20653c5

Please sign in to comment.