Comparing version
@@ -40,4 +40,13 @@ 'use strict'; | ||
var cursor = _ref.cursor; | ||
var nodeOrNull = void 0; | ||
try { | ||
nodeOrNull = new _Node2.default(conn, type, node); | ||
} catch (err) { | ||
nodeOrNull = null; | ||
} | ||
return { | ||
node: new _Node2.default(conn, type, node), | ||
node: nodeOrNull, | ||
cursor: cursor | ||
@@ -106,2 +115,2 @@ }; | ||
exports.default = Connection; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Db25uZWN0aW9uLmpzIl0sIm5hbWVzIjpbIkNvbm5lY3Rpb24iLCJjb25uIiwidHlwZSIsImRhdGEiLCJUeXBlRXJyb3IiLCJwYWdlSW5mbyIsInRvdGFsQ291bnQiLCJlZGdlcyIsIm1hcCIsIm5vZGUiLCJjdXJzb3IiLCJmbiIsImV2ZXJ5Iiwic29tZSIsImluaXRpYWxWYWx1ZSIsInJlZHVjZSIsImZvckVhY2giXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7Ozs7Ozs7O0lBRXFCQSxVO0FBQ25CLHNCQUFZQyxJQUFaLEVBQWtCQyxJQUFsQixFQUF3QkMsSUFBeEIsRUFBOEI7QUFBQTs7QUFDNUIsUUFBSSxDQUFDRixJQUFMLEVBQVc7QUFDVCxZQUFNLElBQUlHLFNBQUosQ0FBYywwREFBZCxDQUFOO0FBQ0Q7O0FBRUQsUUFBSSxDQUFDRixJQUFMLEVBQVc7QUFDVCxZQUFNLElBQUlFLFNBQUosQ0FBYywwREFBZCxDQUFOO0FBQ0Q7O0FBRUQsUUFBSSxDQUFDRCxJQUFMLEVBQVc7QUFDVCxZQUFNLElBQUlDLFNBQUosQ0FBYywwREFBZCxDQUFOO0FBQ0Q7O0FBRUQsU0FBS0YsSUFBTCxHQUFZQSxJQUFaO0FBQ0EsU0FBS0csUUFBTCxHQUFnQkYsS0FBS0UsUUFBckI7QUFDQSxTQUFLQyxVQUFMLEdBQWtCS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iAgfVxuXG4gIGV2ZXJ5KGZuKSB7XG4gICAgcmV0dXJuIHRoaXMuZWRnZXMuZXZlcnkoKHsgbm9kZSwgY3Vyc29yIH0pID0+IGZuKG5vZGUsIGN1cnNvcikpO1xuICB9XG5cbiAgc29tZShmbikge1xuICAgIHJldHVybiB0aGlzLmVkZ2VzLnNvbWUoKHsgbm9kZSwgY3Vyc29yIH0pID0+IGZuKG5vZGUsIGN1cnNvcikpO1xuICB9XG5cbiAgcmVkdWNlKGZuLCBpbml0aWFsVmFsdWUgPSBbXSkge1xuICAgIHJldHVybiB0aGlzLmVkZ2VzLnJlZHVjZSgoeyBub2RlLCBjdXJzb3IgfSkgPT4gZm4obm9kZSwgY3Vyc29yKSwgaW5pdGlhbFZhbHVlKTtcbiAgfVxuXG4gIGZvckVhY2goZm4pIHtcbiAgICB0aGlzLmVkZ2VzLmZvckVhY2goKHsgbm9kZSwgY3Vyc29yIH0pID0+IGZuKG5vZGUsIGN1cnNvcikpO1xuICB9XG59XG4iXX0= |
@@ -235,2 +235,4 @@ 'use strict'; | ||
return new _Node2.default(conn, relatedSchema, data); | ||
}).catch(function () { | ||
return null; | ||
}); | ||
@@ -269,2 +271,4 @@ } | ||
return new _Node2.default(conn, type, data); | ||
}).catch(function () { | ||
return null; | ||
}); | ||
@@ -351,2 +355,2 @@ } | ||
exports.default = Model; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Nb2RlbC5qcyJdLCJuYW1lcyI6WyJNb2RlbCIsImNvbm4iLCJ0eXBlIiwiVHlwZUVycm9yIiwib3B0aW9ucyIsImNvbm5lY3Rpb24iLCJ0YWJsZSIsIm5hbWUiLCJydW4iLCJ0aGVuIiwiZGF0YSIsImZpbmQiLCJmaXJzdCIsImluZGV4IiwidmFsdWUiLCJnZXRBbGwiLCJmaW5kQnlJbmRleCIsImlkIiwicmVsYXRpb25zaGlwIiwicGFyZW50TmFtZSIsInJlbGF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qdXN0IGNyZWF0ZWRcbiAgICAgICAgLnRoZW4oKHsgZ2VuZXJhdGVkX2tleXM6IGtleXMgfSkgPT4gdGhpcy5mZXRjaChrZXlzWzBdLCBvcHRpb25zKSlcblxuICAgICAgICAvLyBjcmVhdGUgdGhlIG5vZGUgYW5kIHN5bmMgaXRzIHJlbGF0aW9uc2hpcHNcbiAgICAgICAgLnRoZW4obm9kZSA9PiB7XG4gICAgICAgICAgY3JlYXRlZE5vZGUgPSBub2RlO1xuXG4gICAgICAgICAgY29uc3Qgc3luY1JlbGF0aW9uc2hpcHNBcnJheSA9IHN5bmNSZWxhdGlvbnNoaXBzKHJlY29yZCwgdHlwZSwgbm9kZS5pZCk7XG4gICAgICAgICAgcmV0dXJuIHIuZG8oc3luY1JlbGF0aW9uc2hpcHNBcnJheSkucnVuKGNvbm4pO1xuICAgICAgICB9KVxuXG4gICAgICAgIC8vIHJldHVybiB0aGUgbm9kZVxuICAgICAgICAudGhlbigoKSA9PiBjcmVhdGVkTm9kZSk7XG4gICAgfTtcblxuICAgIC8vIGNoZWNrIHJlY29yZCBhbmQgaXRzIHJlbGF0aW9uc2hpcHMgZm9yIFJlZGluayBjb25zdHJhaW50c1xuICAgIHJldHVybiBpc0NyZWF0ZUNvbXBsaWFudChyZWNvcmQsIHR5cGUsIGNvbm4pXG4gICAgICAudGhlbihjaGVja0NvbXBsaWFuY2VBbmROb3JtYWxpemVSZWNvcmQpXG4gICAgICAudGhlbihjcmVhdGVSZWNvcmQpO1xuICB9XG59XG4iXX0= |
@@ -58,7 +58,11 @@ 'use strict'; | ||
} else { | ||
if (data) { | ||
this.data = new _Node2.default(conn, type, data); | ||
} else { | ||
this.data = null; | ||
var node = void 0; | ||
try { | ||
node = new _Node2.default(conn, type, data); | ||
} catch (err) { | ||
node = null; | ||
} | ||
this.data = node; | ||
} | ||
@@ -88,2 +92,2 @@ } | ||
exports.default = Relationship; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb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GVkID0gZmFsc2U7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGxldCBub2RlO1xuXG4gICAgICB0cnkge1xuICAgICAgICBub2RlID0gbmV3IE5vZGUoY29ubiwgdHlwZSwgZGF0YSk7XG4gICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgbm9kZSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHRoaXMuZGF0YSA9IG5vZGU7XG4gICAgfVxuICB9XG5cbiAgcmVxdWlyZXNJbmRleCgpIHtcbiAgICByZXR1cm4gdGhpcy5yZWxhdGlvbiA9PT0gJ2hhc01hbnknICYmIChcbiAgICAgIHRoaXMuaW52ZXJzZS5yZWxhdGlvbiA9PT0gJ2JlbG9uZ3NUbycgfHxcbiAgICAgIHRoaXMuaW52ZXJzZS5yZWxhdGlvbiA9PT0gJ2hhc09uZSdcbiAgICApO1xuICB9XG5cbiAgaXNBcmNoaXZlZCgpIHtcbiAgICByZXR1cm4gdGhpcy5fYXJjaGl2ZWQ7XG4gIH1cblxuICBpc1JlbGF0ZWQoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3JlbGF0ZWQ7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "redink", | ||
"version": "3.0.0-alpha.3", | ||
"version": "3.0.0-alpha.4", | ||
"description": "RethinkDB model layer", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
327874
0.38%3015
0.53%