Comparing version 0.4.4 to 0.4.5
@@ -217,4 +217,4 @@ /* eslint no-shadow: 0 */ | ||
targetIdsQuery = _rethinkdb2['default'].branch(row(link1.right.field), targetIdsQuery.getAll(row(link1.right.field), { index: link1.left.field }), _rethinkdb2['default'].expr([])); | ||
targetIdsQuery = targetIdsQuery.hasFields(link2.left.field); | ||
targetIdsQuery = apply(targetIdsQuery); | ||
targetIdsQuery = targetIdsQuery.hasFields(link2.left.field); | ||
targetIdsQuery = targetIdsQuery.map(function (row) { | ||
@@ -225,3 +225,3 @@ return row(link2.left.field); | ||
var query = link2.right.table.query().getAll(_rethinkdb2['default'].args(targetIdsQuery), { index: link2.right.field }); | ||
var query = _rethinkdb2['default'].branch(targetIdsQuery.count().gt(0), link2.right.table.query().getAll(_rethinkdb2['default'].args(targetIdsQuery), { index: link2.right.field }), _rethinkdb2['default'].expr([])); | ||
return query; | ||
@@ -228,0 +228,0 @@ } |
@@ -333,5 +333,3 @@ /* eslint no-shadow: 0, no-param-reassign: 0 */ | ||
key: 'getRelated', | ||
value: function getRelated(pk, relationName) { | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; | ||
value: function getRelated(pk, relationName, options) { | ||
var relation = this.getRelation(relationName); | ||
@@ -343,6 +341,6 @@ return relation.coerceType(this.queryRelated(pk, relationName, options)); | ||
value: function queryRelated(pk, relationName) { | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; | ||
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var relation = this.getRelation(relationName); | ||
return relation.query(this.get(pk), _defineProperty({}, relationName, options)); | ||
return relation.query(this.get(pk), options); | ||
} | ||
@@ -349,0 +347,0 @@ }, { |
{ | ||
"name": "nothinkdb", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"description": "Functional toolkit for rethinkdb", | ||
@@ -5,0 +5,0 @@ "main": "lib/nothinkdb.js", |
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
30867
657