@karmaniverous/entity-manager
Advanced tools
Comparing version 6.11.4 to 6.12.0
@@ -6,2 +6,3 @@ 'use strict'; | ||
var addKeys = require('./addKeys.js'); | ||
var findIndexToken = require('./findIndexToken.js'); | ||
var ParsedConfig = require('./ParsedConfig.js'); | ||
@@ -96,2 +97,13 @@ var query = require('./query.js'); | ||
/** | ||
* Find an index token in a {@link Config | `Config`} object based on the index `hashKey` and `rangeKey`. | ||
* | ||
* @param hashKeyToken - Index hash key. | ||
* @param rangeKeyToken - Index range key. | ||
* | ||
* @returns Index token if found. | ||
*/ | ||
findIndexToken(hashKeyToken, rangeKeyToken) { | ||
return findIndexToken.findIndexToken(this, hashKeyToken, rangeKeyToken); | ||
} | ||
/** | ||
* Query a database entity across shards in a provider-generic fashion. | ||
@@ -98,0 +110,0 @@ * |
@@ -239,2 +239,3 @@ 'use strict'; | ||
// Validate indexes. | ||
// TODO: Vaidate no two indexes have the same hashKey & rangeKey. | ||
for (const [indexKey, { hashKey, rangeKey, projections }] of Object.entries(data.indexes)) { | ||
@@ -241,0 +242,0 @@ // Validate hash key is sharded. |
@@ -580,2 +580,11 @@ import { EntityMap, TranscodeMap, ConditionalProperty, Exactify, PropertiesOfType, TranscodableProperties, FlattenEntityMap, Transcodes, SortOrder, MutuallyExclusive, NotNever, DefaultTranscodeMap } from '@karmaniverous/entity-tools'; | ||
/** | ||
* Find an index token in a {@link Config | `Config`} object based on the index `hashKey` and `rangeKey`. | ||
* | ||
* @param hashKeyToken - Index hash key. | ||
* @param rangeKeyToken - Index range key. | ||
* | ||
* @returns Index token if found. | ||
*/ | ||
findIndexToken(hashKeyToken: C['HashKey'] | C['ShardedKeys'], rangeKeyToken: C['RangeKey'] | C['UnshardedKeys'] | C['TranscodedProperties']): string | undefined; | ||
/** | ||
* Query a database entity across shards in a provider-generic fashion. | ||
@@ -582,0 +591,0 @@ * |
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib'; | ||
import { pick } from 'radash'; | ||
import { addKeys } from './addKeys.js'; | ||
import { findIndexToken } from './findIndexToken.js'; | ||
import { configSchema } from './ParsedConfig.js'; | ||
@@ -93,2 +94,13 @@ import { query } from './query.js'; | ||
/** | ||
* Find an index token in a {@link Config | `Config`} object based on the index `hashKey` and `rangeKey`. | ||
* | ||
* @param hashKeyToken - Index hash key. | ||
* @param rangeKeyToken - Index range key. | ||
* | ||
* @returns Index token if found. | ||
*/ | ||
findIndexToken(hashKeyToken, rangeKeyToken) { | ||
return findIndexToken(this, hashKeyToken, rangeKeyToken); | ||
} | ||
/** | ||
* Query a database entity across shards in a provider-generic fashion. | ||
@@ -95,0 +107,0 @@ * |
@@ -237,2 +237,3 @@ import { defaultTranscodes } from '@karmaniverous/entity-tools'; | ||
// Validate indexes. | ||
// TODO: Vaidate no two indexes have the same hashKey & rangeKey. | ||
for (const [indexKey, { hashKey, rangeKey, projections }] of Object.entries(data.indexes)) { | ||
@@ -239,0 +240,0 @@ // Validate hash key is sharded. |
@@ -135,3 +135,3 @@ { | ||
"types": "dist/index.d.ts", | ||
"version": "6.11.4" | ||
"version": "6.12.0" | ||
} |
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
177005
57
3845