documentdb
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -0,1 +1,5 @@ | ||
## Changes in 1.5.5 : ## | ||
- Fixed hashParitionResolver resolveForRead(): When no partition key supplied was throwing exception, instead of returning a list of all registered links. | ||
## Changes in 1.5.4 : ## | ||
@@ -2,0 +6,0 @@ |
@@ -149,3 +149,3 @@ /* | ||
UserAgent: "documentdb-nodejs-sdk-1.5.4", | ||
UserAgent: "documentdb-nodejs-sdk-1.5.5", | ||
@@ -152,0 +152,0 @@ DefaultPrecisions: { |
@@ -43,2 +43,3 @@ /* | ||
this.consistentHashRing = new ConsistentHashRing(collectionLinks, options); | ||
this.collectionLinks = collectionLinks; | ||
}, { | ||
@@ -60,3 +61,7 @@ /** | ||
resolveForRead: function (partitionKey) { | ||
return [this._resolve(partitionKey)]; | ||
if (partitionKey === undefined || partitionKey === null) { | ||
return this.collectionLinks; | ||
} | ||
return [this._resolve(partitionKey)]; | ||
}, | ||
@@ -63,0 +68,0 @@ /** |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"author": "Microsoft Corporation", | ||
@@ -15,0 +15,0 @@ "main": "./index.js", |
@@ -78,10 +78,13 @@ /* | ||
it("invalid key", function () { | ||
it("null key", function () { | ||
var resolver = new HashPartitionResolver("ignored", ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]); | ||
assert.throws( | ||
function () { | ||
resolver.resolveForRead(null); | ||
}, | ||
/partitionKey must be a 'string'/); | ||
var links = resolver.resolveForRead(null); | ||
assert.deepEqual(links, ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]); | ||
}); | ||
it("undefined key", function () { | ||
var resolver = new HashPartitionResolver("ignored", ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]); | ||
var links = resolver.resolveForRead(); | ||
assert.deepEqual(links, ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]); | ||
}); | ||
}); | ||
@@ -88,0 +91,0 @@ |
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
3749649
7535
1
30