azure-entities
Advanced tools
Comparing version 5.1.3 to 5.1.4
{ | ||
"name": "azure-entities", | ||
"version": "5.1.3", | ||
"version": "5.1.4", | ||
"author": "Jonas Finnemann Jensen <jopsen@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "azure-entities", |
@@ -125,6 +125,15 @@ Azure Table Storage Entities | ||
* `StringKey(prop)` -- use a single string property as the key | ||
* `ConstantKey(const)` -- use a constant value as the key (common as partitionKey) | ||
* `CompositeKey(props)` -- use a sequence of properties to create the key | ||
* `CompositeKey(props)` -- use a hash of a sequence of properties to create the key | ||
* `ConstantKey(const)` -- use a constant value as the key | ||
* `CompositeKey(...props)` -- use a sequence of properties to create the key | ||
* `HashKey(...props)` -- use a hash of a sequence of properties to create the key | ||
StringKey is the simplest option, and indicates that one property should be treated as the key. | ||
ConstantKey is useful to "ignore" a key field for tables that do not have enough columns to represent both a partition and row key. | ||
It is typically used as a rowKey, with a StringKey as the partitionKey, effectively storing each row in a unique partition and allowing Azure to distribute partitions across servers as needed. | ||
CompositeKey and HashKey are similar, and combine multiple properties into a single key. | ||
CompositeKey uses string concatenation and thus could conceivably support prefix matching, althoug this is not implemented. | ||
HashKey hashes the input properties to a fixed length and is useful for large or unbounded properties. | ||
#### Migrations | ||
@@ -131,0 +140,0 @@ |
@@ -97,2 +97,5 @@ | ||
exports.StringKey = function(key) { | ||
var keys = Array.prototype.slice.call(arguments); | ||
assert(keys.length === 1, 'StringKey takes exactly one key argument'); | ||
assert(typeof key === 'string', 'StringKey takes a string as argument'); | ||
return function(mapping) { | ||
@@ -99,0 +102,0 @@ return new StringKey(mapping, key); |
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
142721
2893
470