Comparing version 3.0.0-alpha.10 to 3.0.0-alpha.11
@@ -38,4 +38,4 @@ 'use strict'; | ||
this.edges = data.edges.map(function (_ref) { | ||
var node = _ref.node; | ||
var cursor = _ref.cursor; | ||
var node = _ref.node, | ||
cursor = _ref.cursor; | ||
@@ -66,4 +66,4 @@ var nodeOrNull = void 0; | ||
return this.edges.map(function (_ref2) { | ||
var node = _ref2.node; | ||
var cursor = _ref2.cursor; | ||
var node = _ref2.node, | ||
cursor = _ref2.cursor; | ||
return fn(node, cursor); | ||
@@ -76,4 +76,4 @@ }); | ||
return this.edges.every(function (_ref3) { | ||
var node = _ref3.node; | ||
var cursor = _ref3.cursor; | ||
var node = _ref3.node, | ||
cursor = _ref3.cursor; | ||
return fn(node, cursor); | ||
@@ -86,4 +86,4 @@ }); | ||
return this.edges.some(function (_ref4) { | ||
var node = _ref4.node; | ||
var cursor = _ref4.cursor; | ||
var node = _ref4.node, | ||
cursor = _ref4.cursor; | ||
return fn(node, cursor); | ||
@@ -95,7 +95,7 @@ }); | ||
value: function reduce(fn) { | ||
var initialValue = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; | ||
var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
return this.edges.reduce(function (_ref5) { | ||
var node = _ref5.node; | ||
var cursor = _ref5.cursor; | ||
var node = _ref5.node, | ||
cursor = _ref5.cursor; | ||
return fn(node, cursor); | ||
@@ -108,4 +108,4 @@ }, initialValue); | ||
this.edges.forEach(function (_ref6) { | ||
var node = _ref6.node; | ||
var cursor = _ref6.cursor; | ||
var node = _ref6.node, | ||
cursor = _ref6.cursor; | ||
return fn(node, cursor); | ||
@@ -120,2 +120,2 @@ }); | ||
exports.default = Connection; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Db25uZWN0aW9uLmpzIl0sIm5hbWVzIjpbIkNvbm5lY3Rpb24iLCJjb25uIiwidHlwZSIsImRhd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iAgfVxuXG4gIGV2ZXJ5KGZuKSB7XG4gICAgcmV0dXJuIHRoaXMuZWRnZXMuZXZlcnkoKHsgbm9kZSwgY3Vyc29yIH0pID0+IGZuKG5vZGUsIGN1cnNvcikpO1xuICB9XG5cbiAgc29tZShmbikge1xuICAgIHJldHVybiB0aGlzLmVkZ2VzLnNvbWUoKHsgbm9kZSwgY3Vyc29yIH0pID0+IGZuKG5vZGUsIGN1cnNvcikpO1xuICB9XG5cbiAgcmVkdWNlKGZuLCBpbml0aWFsVmFsdWUgPSBbXSkge1xuICAgIHJldHVybiB0aGlzLmVkZ2VzLnJlZHVjZSgoeyBub2RlLCBjdXJzb3IgfSkgPT4gZm4obm9kZSwgY3Vyc29yKSwgaW5pdGlhbFZhbHVlKTtcbiAgfVxuXG4gIGZvckVhY2goZm4pIHtcbiAgICB0aGlzLmVkZ2VzLmZvckVhY2goKHsgbm9kZSwgY3Vyc29yIH0pID0+IGZuKG5vZGUsIGN1cnNvcikpO1xuICB9XG59XG4iXX0= |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -10,0 +10,0 @@ var _rethinkdb = require('rethinkdb'); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -10,0 +10,0 @@ var _rethinkdb = require('rethinkdb'); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -10,0 +10,0 @@ var _rethinkdb = require('rethinkdb'); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -10,0 +10,0 @@ var _rethinkdb = require('rethinkdb'); |
@@ -35,5 +35,5 @@ 'use strict'; | ||
var relationship = type.relationships[next]; | ||
var relation = relationship.relation; | ||
var inverse = relationship.inverse; | ||
var field = relationship.field; | ||
var relation = relationship.relation, | ||
inverse = relationship.inverse, | ||
field = relationship.field; | ||
@@ -40,0 +40,0 @@ var data = record[field]; |
@@ -10,6 +10,6 @@ 'use strict'; | ||
exports.default = function (relationshipObject, ids, conn) { | ||
var type = relationshipObject.type; | ||
var _relationshipObject$i = relationshipObject.inverse; | ||
var inverseRelation = _relationshipObject$i.relation; | ||
var inverseField = _relationshipObject$i.field; | ||
var type = relationshipObject.type, | ||
_relationshipObject$i = relationshipObject.inverse, | ||
inverseRelation = _relationshipObject$i.relation, | ||
inverseField = _relationshipObject$i.field; | ||
@@ -16,0 +16,0 @@ |
@@ -10,7 +10,7 @@ 'use strict'; | ||
exports.default = function (relationshipObject, id, conn) { | ||
var type = relationshipObject.type; | ||
var relation = relationshipObject.relation; | ||
var _relationshipObject$i = relationshipObject.inverse; | ||
var inverseRelation = _relationshipObject$i.relation; | ||
var inverseField = _relationshipObject$i.field; | ||
var type = relationshipObject.type, | ||
relation = relationshipObject.relation, | ||
_relationshipObject$i = relationshipObject.inverse, | ||
inverseRelation = _relationshipObject$i.relation, | ||
inverseField = _relationshipObject$i.field; | ||
@@ -17,0 +17,0 @@ |
@@ -10,6 +10,6 @@ 'use strict'; | ||
exports.default = function (relationship, data, conn) { | ||
var inverse = relationship.inverse; | ||
var name = relationship.name; | ||
var relation = inverse.relation; | ||
var field = inverse.field; | ||
var inverse = relationship.inverse, | ||
name = relationship.name; | ||
var relation = inverse.relation, | ||
field = inverse.field; | ||
@@ -16,0 +16,0 @@ |
@@ -10,6 +10,6 @@ 'use strict'; | ||
exports.default = function (relationship, data, conn) { | ||
var inverse = relationship.inverse; | ||
var name = relationship.name; | ||
var relation = inverse.relation; | ||
var field = inverse.field; | ||
var inverse = relationship.inverse, | ||
name = relationship.name; | ||
var relation = inverse.relation, | ||
field = inverse.field; | ||
@@ -16,0 +16,0 @@ |
@@ -10,6 +10,6 @@ 'use strict'; | ||
exports.default = function (relationship, data, conn) { | ||
var inverse = relationship.inverse; | ||
var name = relationship.name; | ||
var relation = inverse.relation; | ||
var field = inverse.field; | ||
var inverse = relationship.inverse, | ||
name = relationship.name; | ||
var relation = inverse.relation, | ||
field = inverse.field; | ||
@@ -16,0 +16,0 @@ |
@@ -88,5 +88,5 @@ 'use strict'; | ||
value: function find() { | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var conn = this.conn; | ||
var type = this.type; | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var conn = this.conn, | ||
type = this.type; | ||
@@ -112,3 +112,3 @@ var connection = (0, _utils.createConnection)(type, _rethinkdb2.default.table(type.name), options); | ||
value: function findOne() { | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
@@ -142,5 +142,5 @@ return this.find(options).then(function (connection) { | ||
value: function findByIndex(index, value) { | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var conn = this.conn; | ||
var type = this.type; | ||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var conn = this.conn, | ||
type = this.type; | ||
@@ -177,5 +177,5 @@ | ||
value: function findByIds(ids) { | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var conn = this.conn; | ||
var type = this.type; | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var conn = this.conn, | ||
type = this.type; | ||
@@ -205,3 +205,3 @@ | ||
value: function findOneByIndex(index, value) { | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
@@ -243,11 +243,11 @@ return this.findByIndex(index, value, options).then(function (connection) { | ||
value: function findRelated(id, relationship) { | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var conn = this.conn; | ||
var type = this.type; | ||
var parentName = this.type.name; | ||
var _type$relationships$r = type.relationships[relationship]; | ||
var relatedName = _type$relationships$r.name; | ||
var relatedSchema = _type$relationships$r.type; | ||
var relation = _type$relationships$r.relation; | ||
var inverse = _type$relationships$r.inverse; | ||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var conn = this.conn, | ||
type = this.type, | ||
parentName = this.type.name; | ||
var _type$relationships$r = type.relationships[relationship], | ||
relatedName = _type$relationships$r.name, | ||
relatedSchema = _type$relationships$r.type, | ||
relation = _type$relationships$r.relation, | ||
inverse = _type$relationships$r.inverse; | ||
@@ -299,5 +299,5 @@ | ||
value: function fetch(id) { | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var conn = this.conn; | ||
var type = this.type; | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var conn = this.conn, | ||
type = this.type; | ||
@@ -346,5 +346,5 @@ | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var conn = this.conn; | ||
var type = this.type; | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var conn = this.conn, | ||
type = this.type; | ||
var name = type.name; | ||
@@ -395,2 +395,2 @@ | ||
exports.default = Model; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Nb2RlbC5qcyJdLCJuYW1lcyI6WyJNb2RlbCIsImNvbm4iLCJ0eXBlIiwiVHlwZUVycm9yIiwib3B0aW9ucyIsImNvbm5lY3Rpb24iLCJ0YWJsZSIsIm5hbWUiLCJydW4iLCJ0aGVuIiwiZGF0YSIsImZpbmQiLCJmaXJzdCIsImluZGV4IiwidmFsdWUiLCJnZXRBbGwiLCJpZHMiLCJhcmdzIiwiZmluZEJ5SW5kZXgiLCJpZCIsInJlbGF0aW9uc2hpcCIsInBhcmVudE5hbWUiLCJyZWxhdGlvbnNoaXBzIiwicmVsYXRlZE5hbWUiLCJyZWxhdGVkU2NoZW1hIiwicmVsYXRpb24iLCJpbnZlcnNlIiwicXVlcnkiLCJmaWVsZCIsImdldCIsImNhdGNoIiwicmVjb3JkIiwiY2hlY2tDb21wbGlhbmNlQW5kTm9ybWFsaXplUmVjb3JkIiwiY29tcGxpYW50IiwiRXJyb3IiLCJjcmVhdGVSZWNvcmQiLCJub3JtYWxpemVkUmVjb3JkIiwiY3JlYXRlZE5vZGUiLCJpbnNlcnQiLCJrZXlzIiwiZ2VuZXJhdGVkX2tleXMiLCJmZXRjaCIsIm5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A9IHN5bmNSZWxhdGlvbnNoaXBzKHJlY29yZCwgdHlwZSwgbm9kZS5pZCk7XG4gICAgICAgICAgcmV0dXJuIHIuZG8oc3luY1JlbGF0aW9uc2hpcHNBcnJheSkucnVuKGNvbm4pO1xuICAgICAgICB9KVxuXG4gICAgICAgIC8vIHJldHVybiB0aGUgbm9kZVxuICAgICAgICAudGhlbigoKSA9PiBjcmVhdGVkTm9kZSk7XG4gICAgfTtcblxuICAgIC8vIGNoZWNrIHJlY29yZCBhbmQgaXRzIHJlbGF0aW9uc2hpcHMgZm9yIFJlZGluayBjb25zdHJhaW50c1xuICAgIHJldHVybiBpc0NyZWF0ZUNvbXBsaWFudChyZWNvcmQsIHR5cGUsIGNvbm4pXG4gICAgICAudGhlbihjaGVja0NvbXBsaWFuY2VBbmROb3JtYWxpemVSZWNvcmQpXG4gICAgICAudGhlbihjcmVhdGVSZWNvcmQpO1xuICB9XG59XG4iXX0= |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -10,0 +10,0 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); |
@@ -29,6 +29,6 @@ 'use strict'; | ||
var getInverseIdsToUpdate = exports.getInverseIdsToUpdate = function getInverseIdsToUpdate() { | ||
var originalOldIds = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; | ||
var originalNewIds = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; | ||
var originalOldIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; | ||
var originalNewIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
return (0, _rethinkdb2.default)(originalOldIds).setUnion((0, _rethinkdb2.default)(convertIdsToResourcePointers(originalNewIds))).difference((0, _rethinkdb2.default)(originalOldIds)); | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3V0aWxzLmpzIl0sIm5hbWVzIjpbImNvbnZlcnRJZFRvUmVzb3VyY2VQb2ludGVyIiwiaWQiLCJfYXJjaGl2ZWQiLCJfcmVsYXRlZCIsImNvbnZlcnRJZHNUb1Jlc291cmNlUG9pbnRlcnMiLCJpZHMiLCJtYXAiLCJnZXRJbnZlcnNlSWRzVG9VcGRhdGUiLCJvcmlnaW5hbE9sZElkcyIsIm9yaWdpbmFsTmV3SWRzIiwic2V0VW5pb24iLCJkaWZmZXJlbmNlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7Ozs7OztBQUVPLElBQU1BLGtFQUE2QixTQUE3QkEsMEJBQTZCLENBQUNDLEVBQUQ7QUFBQSxTQUFTO0FBQ2pEQSxVQURpRDtBQUVqREMsZUFBVyxLQUZzQztBQUdqREMsY0FBVTtBQUh1QyxHQUFUO0FBQUEsQ0FBbkM7O0FBTUEsSUFBTUMsc0VBQStCLFNBQS9CQSw0QkFBK0IsQ0FBQ0MsR0FBRDtBQUFBLFNBQzFDQSxJQUFJQyxHQUFKLENBQVE7QUFBQSxXQUFNTiwyQkFBMkJDLEVBQTNCLENBQU47QUFBQSxHQUFSLENBRDBDO0FBQUEsQ0FBckM7O0FBSUEsSUFBTU0sd0RBQXdCLFNBQX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RlZDogdHJ1ZSxcbn0pO1xuXG5leHBvcnQgY29uc3QgY29udmVydElkc1RvUmVzb3VyY2VQb2ludGVycyA9IChpZHMpID0+IChcbiAgaWRzLm1hcChpZCA9PiBjb252ZXJ0SWRUb1Jlc291cmNlUG9pbnRlcihpZCkpXG4pO1xuXG5leHBvcnQgY29uc3QgZ2V0SW52ZXJzZUlkc1RvVXBkYXRlID0gKG9yaWdpbmFsT2xkSWRzID0gW10sIG9yaWdpbmFsTmV3SWRzID0gW10pID0+IChcbiAgcihvcmlnaW5hbE9sZElkcylcbiAgICAuc2V0VW5pb24ocihjb252ZXJ0SWRzVG9SZXNvdXJjZVBvaW50ZXJzKG9yaWdpbmFsTmV3SWRzKSkpXG4gICAgLmRpZmZlcmVuY2UocihvcmlnaW5hbE9sZElkcykpXG4pO1xuIl19 |
@@ -54,16 +54,16 @@ 'use strict'; | ||
function Redink(_ref) { | ||
var _ref$db = _ref.db; | ||
var db = _ref$db === undefined ? '' : _ref$db; | ||
var _ref$host = _ref.host; | ||
var host = _ref$host === undefined ? '' : _ref$host; | ||
var _ref$user = _ref.user; | ||
var user = _ref$user === undefined ? '' : _ref$user; | ||
var _ref$password = _ref.password; | ||
var password = _ref$password === undefined ? '' : _ref$password; | ||
var _ref$schema = _ref.schema; | ||
var schema = _ref$schema === undefined ? {} : _ref$schema; | ||
var _ref$verbose = _ref.verbose; | ||
var verbose = _ref$verbose === undefined ? false : _ref$verbose; | ||
var _ref$port = _ref.port; | ||
var port = _ref$port === undefined ? DEFAULT_RETHINKDB_PORT : _ref$port; | ||
var _ref$db = _ref.db, | ||
db = _ref$db === undefined ? '' : _ref$db, | ||
_ref$host = _ref.host, | ||
host = _ref$host === undefined ? '' : _ref$host, | ||
_ref$user = _ref.user, | ||
user = _ref$user === undefined ? '' : _ref$user, | ||
_ref$password = _ref.password, | ||
password = _ref$password === undefined ? '' : _ref$password, | ||
_ref$schema = _ref.schema, | ||
schema = _ref$schema === undefined ? {} : _ref$schema, | ||
_ref$verbose = _ref.verbose, | ||
verbose = _ref$verbose === undefined ? false : _ref$verbose, | ||
_ref$port = _ref.port, | ||
port = _ref$port === undefined ? DEFAULT_RETHINKDB_PORT : _ref$port; | ||
@@ -144,5 +144,5 @@ _classCallCheck(this, Redink); | ||
var conn = this.conn; | ||
var schema = this.schema; | ||
var db = this.db; | ||
var conn = this.conn, | ||
schema = this.schema, | ||
db = this.db; | ||
@@ -158,7 +158,7 @@ var names = []; | ||
type.relationships.forEach(function (relationship) { | ||
var relation = relationship.relation; | ||
var relatedName = relationship.name; | ||
var _relationship$inverse = relationship.inverse; | ||
var inverseRelation = _relationship$inverse.relation; | ||
var inverseField = _relationship$inverse.field; | ||
var relation = relationship.relation, | ||
relatedName = relationship.name, | ||
_relationship$inverse = relationship.inverse, | ||
inverseRelation = _relationship$inverse.relation, | ||
inverseField = _relationship$inverse.field; | ||
@@ -210,5 +210,5 @@ | ||
value: function reconcileMissingIndices(table) { | ||
var conn = this.conn; | ||
var indices = this.indices; | ||
var verbose = this.verbose; | ||
var conn = this.conn, | ||
indices = this.indices, | ||
verbose = this.verbose; | ||
@@ -263,4 +263,4 @@ | ||
var indices = this.indices; | ||
var verbose = this.verbose; | ||
var indices = this.indices, | ||
verbose = this.verbose; | ||
var keys = Object.keys; | ||
@@ -321,8 +321,6 @@ | ||
var models = names.reduce(function (prev, type) { | ||
var _destructureAlias = (0, _utils.destructureAlias)(type); | ||
var _destructureAlias = (0, _utils.destructureAlias)(type), | ||
model = _destructureAlias.model, | ||
alias = _destructureAlias.alias; | ||
var model = _destructureAlias.model; | ||
var alias = _destructureAlias.alias; | ||
return _extends({}, prev, _defineProperty({}, type, { | ||
@@ -342,2 +340,2 @@ model: _this4.models[model], | ||
exports.default = Redink; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9SZWRpbmsuanMiXSwibmFtZXMiOlsiREVGQVVMVF9SRVRISU5LREJfUE9SVCIsIl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aXMgZG9jdW1lbnRhdGlvbi5cbiAgICovXG4gIGNvbmZpZ3VyZUluZGljZXMoKSB7XG4gICAgY29uc3QgeyBpbmRpY2VzLCB2ZXJib3NlIH0gPSB0aGlzO1xuICAgIGNvbnN0IHsga2V5cyB9ID0gT2JqZWN0O1xuXG4gICAgcmV0dXJuIFByb21pc2UucHJvcHMoXG4gICAgICBrZXlzKGluZGljZXMpLnJlZHVjZSgocHJldiwgbmV4dCkgPT4gKHtcbiAgICAgICAgLi4ucHJldixcbiAgICAgICAgW25leHRdOiB0aGlzLnJlY29uY2lsZU1pc3NpbmdJbmRpY2VzKG5leHQpLFxuICAgICAgfSksIHt9KVxuICAgICkudGhlbihyZWNvbmNpbGVkVGFibGVzID0+IHtcbiAgICAgIGlmICh2ZXJib3NlKSB7XG4gICAgICAgIGtleXMocmVjb25jaWxlZFRhYmxlcykuZm9yRWFjaCh0YWJsZSA9PiB7XG4gICAgICAgICAgcmVjb25jaWxlZFRhYmxlc1t0YWJsZV0uZm9yRWFjaChpbmRleCA9PiB7XG4gICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmVcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKFxuICAgICAgICAgICAgICBgSW5kZXggJHtjaGFsay5ibHVlKGluZGV4LmluZGV4KX0gb24gdGFibGUgJHtjaGFsay5ibHVlKHRhYmxlKX0gc3RhdHVzOiBgICtcbiAgICAgICAgICAgICAgYCR7aW5kZXgucmVhZHkgPyBjaGFsay5ncmVlbigncmVhZHknKSA6IGNoYWxrLnJlZCgnZXJyb3InKX0uYFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogUmV0dXJucyBhIGBNb2RlbGAgb3IgYE1vZGVsQXJyYXlgIGluc3RhbmNlIHdpdGggdGhlIG1hdGNoaW5nIHR5cGUocykgZnJvbSBSZWRpbmsncyBtb2Rl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ZHVjZSgocHJldiwgdHlwZSkgPT4ge1xuICAgICAgY29uc3QgeyBtb2RlbCwgYWxpYXMgfSA9IGRlc3RydWN0dXJlQWxpYXModHlwZSk7XG5cbiAgICAgIHJldHVybiB7XG4gICAgICAgIC4uLnByZXYsXG4gICAgICAgIFt0eXBlXToge1xuICAgICAgICAgIG1vZGVsOiB0aGlzLm1vZGVsc1ttb2RlbF0sXG4gICAgICAgICAgYWxpYXMsXG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgIH0sIHt9KTtcblxuICAgIHJldHVybiBuZXcgTW9kZWxBcnJheShtb2RlbHMpO1xuICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9SZWRpbmsuanMiXSwibmFtZXMiOlsiREVGQVVMVF9SRVRISU5LREJfUE9SVCIsIlJlZGluayIsImRiIiwiaG9zdCIsInVzZXIiLCJwYXNzd29yZCIsInNjaGVtYSIsInZlcmJvc2UiLCJwb3J0IiwiaW5kaWNlcyIsIm1vZGVscyIsIm9wdGlvbnMiLCJjb25uZWN0IiwidGhlbiIsImNvbm4iLCJyZWdpc3RlclNjaGVtYSIsImNvbmZpZ3VyZUluZGljZXMiLCJFcnJvciIsImNsb3NlIiwibmFtZXMiLCJ0eXBlcyIsImZvckVhY2giLCJuYW1lIiwidHlwZSIsImluY2x1ZGVzIiwicHVzaCIsInJlbGF0aW9uc2hpcHMiLCJyZWxhdGlvbiIsInJlbGF0aW9uc2hpcCIsInJlbGF0ZWROYW1lIiwiaW52ZXJzZSIsImludmVyc2VSZWxhdGlvbiIsImludmVyc2VGaWVsZCIsImZpZWxkIiwiT2JqZWN0IiwiZnJlZXplIiwidGFibGVMaXN0IiwicnVuIiwibWlzc2luZ1RhYmxlcyIsImZpbHRlciIsInRhYmxlcyIsInByb3BzIiwicmVkdWNlIiwicHJldiIsIm5leHQiLCJ0YWJsZUNyZWF0ZSIsInRhYmxlIiwiZm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nRhYmxlKHRhYmxlKS5pbmRleENyZWF0ZShpbmRleCwgci5yb3coaW5kZXgpKCdpZCcpKS5ydW4oY29ubilcbiAgICAgICAgICApXG4gICAgICAgICk7XG4gICAgICB9KVxuXG4gICAgICAvLyB3YWl0IGZvciBhbGwgdGhlIGluZGljZXMgb24gYHRhYmxlYCB0byBmaW5pc2ggY3JlYXRpbmdcbiAgICAgIC50aGVuKCgpID0+IHIudGFibGUodGFibGUpLmluZGV4V2FpdCgpLnJ1bihjb25uKSk7XG4gIH1cblxuICAvKipcbiAgICogQ29uZmlndXJlcyBpbmRpY2VzIHdoZXJlIG5lY2Vzc2FyeS5cbiAgICpcbiAgICogQGFzeW5jXG4gICAqIEBwcml2YXRlXG4gICAqIEByZXR1cm4ge1Byb21pc2V9XG4gICAqXG4gICAqIEB0b2RvIEV4cGFuZCBvbiB0aGlzIGRvY3VtZW50YXRpb24uXG4gICAqL1xuICBjb25maWd1cmVJbmRpY2VzKCkge1xuICAgIGNvbnN0IHsgaW5kaWNlcywgdmVyYm9zZSB9ID0gdGhpcztcbiAgICBjb25zdCB7IGtleXMgfSA9IE9iamVjdDtcblxuICAgIHJldHVybiBQcm9taXNlLnByb3BzKFxuICAgICAga2V5cyhpbmRpY2VzKS5yZWR1Y2UoKHByZXYsIG5leHQpID0+ICh7XG4gICAgICAgIC4uLnByZXYsXG4gICAgICAgIFtuZXh0XTogdGhpcy5yZWNvbmNpbGVNaXNzaW5nSW5kaWNlcyhuZXh0KSxcbiAgICAgIH0pLCB7fSlcbiAgICApLnRoZW4ocmVjb25jaWxlZFRhYmxlcyA9PiB7XG4gICAgICBpZiAodmVyYm9zZSkge1xuICAgICAgICBrZXlzKHJlY29uY2lsZWRUYWJsZXMpLmZvckVhY2godGFibGUgPT4ge1xuICAgICAgICAgIHJlY29uY2lsZWRUYWJsZXNbdGFibGVdLmZvckVhY2goaW5kZXggPT4ge1xuICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG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pcmVkIHRvIGFjY2VzcyBhIE1vZGVsIGluc3RhbmNlLidcbiAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKG5hbWVzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgY29uc3QgbW9kZWwgPSB0aGlzLm1vZGVsc1tuYW1lc1swXV07XG5cbiAgICAgIGlmICghbW9kZWwpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgIGBUcmllZCBhY2Nlc3NpbmcgYSBtb2RlbCB3aXRoIHR5cGUgJyR7bmFtZXNbMF19JywgYnV0IG5vIHN1Y2ggbW9kZWwgd2FzIGV2ZXIgcmVnaXN0ZXJlZC5gXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBtb2RlbDtcbiAgICB9XG5cbiAgICBjb25zdCBtb2RlbHMgPSBuYW1lcy5yZWR1Y2UoKHByZXYsIHR5cGUpID0+IHtcbiAgICAgIGNvbnN0IHsgbW9kZWwsIGFsaWFzIH0gPSBkZXN0cnVjdHVyZUFsaWFzKHR5cGUpO1xuXG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5wcmV2LFxuICAgICAgICBbdHlwZV06IHtcbiAgICAgICAgICBtb2RlbDogdGhpcy5tb2RlbHNbbW9kZWxdLFxuICAgICAgICAgIGFsaWFzLFxuICAgICAgICB9LFxuICAgICAgfTtcbiAgICB9LCB7fSk7XG5cbiAgICByZXR1cm4gbmV3IE1vZGVsQXJyYXkobW9kZWxzKTtcbiAgfVxufVxuIl19 |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -32,10 +32,10 @@ var _Connection = require('./Connection'); | ||
function Relationship(conn, parentType, field) { | ||
var data = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; | ||
var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; | ||
_classCallCheck(this, Relationship); | ||
var _parentType$relations = parentType.relationships[field]; | ||
var type = _parentType$relations.type; | ||
var relation = _parentType$relations.relation; | ||
var inverse = _parentType$relations.inverse; | ||
var _parentType$relations = parentType.relationships[field], | ||
type = _parentType$relations.type, | ||
relation = _parentType$relations.relation, | ||
inverse = _parentType$relations.inverse; | ||
@@ -93,2 +93,2 @@ | ||
exports.default = Relationship; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9SZWxhdGlvbnNoaXAuanMiXSwibmFtZXMiOlsiaXNIYXNNYW55UmVsYXRpb25zaGlwSHlkcmF0ZWQiLCJkYXRhIiwiT2JqZWN0Iiwia2V5cyIsImluY2x1ZGVzIiwiUmVsYXRpb25zaGlwIiwiY29ubiIsInBhcmVudFR5cGUiLCJmaWVsZCIsInJlbGF0aW9uc2hpcHMiLCJ0eXBlIiwicmVsYXRpb24iLCJpbnZlcnNlIiwiX2FyY2hpdmVkIiwiX3JlbGF0ZWQiLCJpc0h5ZHJhdGVkIiwibm9kZSIsImVyciJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBRUEsSUFBTUEsZ0NBQWdDLFNBQWhDQSw2QkFBZ0MsQ0FBQ0MsSUFBRDtBQUFBLFNBQ3BDQSxRQUNBLFFBQU9BLElBQVAseUNBQU9BLElBQVAsT0FBZ0IsUUFEaEIsSUFFQUMsT0FBT0MsSUFBUCxDQUFZRixJQUFaLEVBQWtCRyxRQUFsQixDQUEyQixPQUEzQixDQUhvQztBQUFBLENBQXRDOztJQU1xQkMsWTtBQUNuQix3Qk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y5fYXJjaGl2ZWQ7XG4gIH1cblxuICBpc1JlbGF0ZWQoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3JlbGF0ZWQ7XG4gIH1cbn1cbiJdfQ== |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /* eslint-disable no-param-reassign */ | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* eslint-disable no-param-reassign */ | ||
@@ -59,2 +59,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9hcHBseU9wdGlvbnMuanMiXSwibmFtZXMiOlsicXVlcnkiLCJvcHRpb25zIiwicm93IiwiZmlsdGVyIiwicGx1Y2siLCJpZCIsIndpdGhvdXQiLCJiZXR3ZWVuIiwic2tpcCIsImxpbWl0Iiwib3JkZXJCeSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7a1BBQUE7OztBQUNBOzs7Ozs7a0JBRWUsVUFBQ0EsS0FBRCxFQUFRQyxPQUFSLEVBQW9CO0FBQ2pDLE1BQUksUUFBT0EsT0FBUCx5Q0FBT0EsT0FBUCxPQUFtQixRQUF2QixFQUFpQyxPQUFPRCxLQUFQOztBQUVqQyxNQUFJRSxNQUFNRixLQUFWOztBQUVBLE1BQUksOEJBQWVDLE9BQWYsRUFBd0IsUUFBeEIsQ0FBSixFQUF1QztBQUNyQ0MsVUFBTUEsSUFBSUMsTUFBSixDQUFXRixRQUFRRSxNQUFuQixDQUFOO0FBQ0Q7O0FBRUQsTUFBSSw4QkFBZUYsT0FBZixFQUF3QixPQUF4Qix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dWNrLFxuICAgICAgaWQ6IHRydWUsXG4gICAgfSk7XG4gIH1cblxuICBpZiAoaGFzT3duUHJvcGVydHkob3B0aW9ucywgJ3dpdGhvdXQnKSkge1xuICAgIC8vIGRpc2FsbG93IGZvcmdvaW5nIHRoZSBpZFxuICAgIGRlbGV0ZSBvcHRpb25zLndpdGhvdXQuaWQ7XG4gICAgcm93ID0gcm93LndpdGhvdXQob3B0aW9ucy53aXRob3V0KTtcbiAgfVxuXG4gIGlmIChoYXNPd25Qcm9wZXJ0eShvcHRpb25zLCAnYmV0d2VlbicpKSB7XG4gICAgcm93ID0gcm93LmJldHdlZW4ob3B0aW9ucy5iZXR3ZWVuKTtcbiAgfVxuXG4gIGlmIChoYXNPd25Qcm9wZXJ0eShvcHRpb25zLCAnc2tpcCcpKSB7XG4gICAgcm93ID0gcm93LnNraXAob3B0aW9ucy5za2lwKTtcbiAgfVxuXG4gIGlmIChoYXNPd25Qcm9wZXJ0eShvcHRpb25zLCAnbGltaXQnKSkge1xuICAgIHJvdyA9IHJvdy5saW1pdChvcHRpb25zLmxpbWl0KTtcbiAgfVxuXG4gIGlmIChoYXNPd25Qcm9wZXJ0eShvcHRpb25zLCAnb3JkZXJCeScpKSB7XG4gICAgcm93ID0gcm93Lm9yZGVyQnkob3B0aW9ucy5vcmRlckJ5KTtcbiAgfVxuXG4gIHJldHVybiByb3c7XG59O1xuIl19 |
@@ -48,7 +48,6 @@ 'use strict'; | ||
var _decodedCursor = _slicedToArray(decodedCursor, 2); | ||
var _decodedCursor = _slicedToArray(decodedCursor, 2), | ||
table = _decodedCursor[0], | ||
pkey = _decodedCursor[1]; | ||
var table = _decodedCursor[0]; | ||
var pkey = _decodedCursor[1]; | ||
return _rethinkdb2.default.tableList().contains(table).branch(_rethinkdb2.default.table(table).get(pkey), null); | ||
@@ -74,3 +73,3 @@ }; | ||
exports.default = function (type, sequence) { | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var name = type.name; | ||
@@ -182,2 +181,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jcmVhdGVDb25uZWN0aW9uLmpzIl0sIm5hbWVzIjpbImluZGV4T2ZEYXR1bSIsInNlcXVlbmNlIiwiZGF0dW0iLCJvZmZzZXRzT2YiLCJjb2VyY2VUbyIsImRvIiwib2Zmc2V0cyIsImNvdW50IiwiZ3QiLCJicmFuY2giLCJkZWNvZGVDdXJzb3IiLCJjdXJzb3IiLCJkZWNvZGVkIiwiQnVmZmVyIiwiZnJvbSIsIlN0cmluZyIsInRvU3RyaW5nIiwic3BsaXQiLCJsZW5ndGgiLCJkZWNvZGVkQ3Vyc29yVG9EYXR1bSIsImRlY29kZWRDdXJzb3IiLCJ0YWJsZSIsInBrZXkiLCJ0YWJsZUxpc3QiLCJjb250YWlucyIsImdldCIsIm5vZGVUb0N1cnNvciIsIm5hbWUiLCJub2RlIiwiYWRkIiwidHlwZU9mIiwiZXEiLCJlbnN1cmVOb25OZWdhdGl2ZSIsIm51bSIsImFyZ05hbWUiLCJFcnJvciIsInR5cGUiLCJvcHRpb25zIiwiYWZ0ZXIiLCJiZWZvcmUiLCJsYXN0IiwiZmlyc3QiLCJhZnRlckluZGV4IiwiYmVmb3JlSW5kZXgiLCJlZGdlcyIsImZpbHRlciIsInBsdWNrIiwiaWQiLCJ3aXRob3V0IiwiT2JqZWN0Iiwia2V5cyIsInJlZHVjZSIsInByZXYiLCJjdXJyIiwicGFnZSIsInRvdGFsQ291bnQiLCJkZWNvZGVkQWZ0ZXJDdXJzb3IiLCJkZWNvZGVkQmVmb3JlQ3Vyc29yIiwiZ2UiLCJzbGljZSIsImxlZnRCb3VuZCIsInJpZ2h0Qm91bmQiLCJiZWZvcmVDb3VudCIsInVuZGVmaW5lZCIsImVkZ2VzQ291bnQiLCJhY3R1Y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ZGdlcy5tYXAoKG5vZGUpID0+ICh7XG4gICAgbm9kZSxcbiAgICBjdXJzb3I6IG5vZGVUb0N1cnNvcihuYW1lLCBub2RlKSxcbiAgfSkpLmNvZXJjZVRvKCdhcnJheScpO1xuXG4gIHJldHVybiByKHtcbiAgICBlZGdlcyxcbiAgICB0b3RhbENvdW50LFxuICAgIGlzQ29ubmVjdGlvbjogdHJ1ZSxcbiAgICBwYWdlSW5mbzoge1xuICAgICAgc3RhcnRDdXJzb3I6IGVkZ2VzLmNvdW50KCkuZ3QoMCkuYnJhbmNoKGVkZ2VzKDApKCdjdXJzb3InKSwgbnVsbCksXG4gICAgICBlbmRDdXJzb3I6IGVkZ2VzLmNvdW50KCkuZ3QoMCkuYnJhbmNoKGVkZ2VzLm50aCgtMSkoJ2N1cnNvcicpLCBudWxsKSxcbiAgICAgIGhhc1ByZXZpb3VzUGFnZSxcbiAgICAgIGhhc05leHRQYWdlLFxuICAgIH0sXG4gIH0pO1xufTtcbiJdfQ== |
@@ -19,5 +19,5 @@ 'use strict'; | ||
return node.relationships.reduce(function (prev, relationship) { | ||
var relation = relationship.relation; | ||
var field = relationship.field; | ||
var inverseRelation = relationship.inverse.relation; | ||
var relation = relationship.relation, | ||
field = relationship.field, | ||
inverseRelation = relationship.inverse.relation; | ||
@@ -24,0 +24,0 @@ |
@@ -95,7 +95,7 @@ 'use strict'; | ||
var _relationships$field = relationships[field]; | ||
var name = _relationships$field.name; | ||
var relation = _relationships$field.relation; | ||
var inverse = _relationships$field.inverse; | ||
var relatedType = _relationships$field.type; | ||
var _relationships$field = relationships[field], | ||
name = _relationships$field.name, | ||
relation = _relationships$field.relation, | ||
inverse = _relationships$field.inverse, | ||
relatedType = _relationships$field.type; | ||
@@ -102,0 +102,0 @@ var relatedTable = _rethinkdb2.default.table(name); |
@@ -39,5 +39,5 @@ 'use strict'; | ||
var relationshipObject = type.relationships[relationship]; | ||
var field = relationshipObject.field; | ||
var relation = relationshipObject.relation; | ||
var inverse = relationshipObject.inverse; | ||
var field = relationshipObject.field, | ||
relation = relationshipObject.relation, | ||
inverse = relationshipObject.inverse; | ||
@@ -44,0 +44,0 @@ var data = record[field]; |
@@ -19,8 +19,8 @@ 'use strict'; | ||
type.relationships.forEach(function (relationship) { | ||
var field = relationship.field; | ||
var name = relationship.name; | ||
var relation = relationship.relation; | ||
var inverse = relationship.inverse; | ||
var inverseField = inverse.field; | ||
var inverseRelation = inverse.relation; | ||
var field = relationship.field, | ||
name = relationship.name, | ||
relation = relationship.relation, | ||
inverse = relationship.inverse; | ||
var inverseField = inverse.field, | ||
inverseRelation = inverse.relation; | ||
@@ -27,0 +27,0 @@ var data = record[field]; |
{ | ||
"name": "redink", | ||
"version": "3.0.0-alpha.10", | ||
"version": "3.0.0-alpha.11", | ||
"description": "RethinkDB model layer", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
336814
3106