@karmaniverous/entity-manager 6.7.4 → 6.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,8 @@ var radash = require('radash');
7
7
  *
8
8
  * @category ShardQueryMapBuilder
9
9
  */
10
- class BaseShardQueryMapBuilder {
11
- /** BaseShardQueryMapBuilder constructor. */
10
+ class BaseQueryBuilder {
11
+ /** BaseQueryBuilder constructor. */
12
12
  constructor(options) {
13
13
  /**
14
14
  * Maps `indexToken` values to database platform-specific query parameters.
@@ -43,4 +43,4 @@ class BaseShardQueryMapBuilder {
43
43
  }
44
44
  }
45
45
 
46
- exports.BaseShardQueryMapBuilder = BaseShardQueryMapBuilder;
46
+ exports.BaseQueryBuilder = BaseQueryBuilder;
package/dist/cjs/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var BaseEntityClient = require('./BaseEntityClient.js');
4
- var BaseShardQueryMapBuilder = require('./BaseShardQueryMapBuilder.js');
4
+ var BaseQueryBuilder = require('./BaseQueryBuilder.js');
5
5
  var conditionalize = require('./conditionalize.js');
6
6
  var EntityManager = require('./EntityManager.js');
7
7
 
8
8
 
9
9
 
10
10
  exports.BaseEntityClient = BaseEntityClient.BaseEntityClient;
11
- exports.BaseShardQueryMapBuilder = BaseShardQueryMapBuilder.BaseShardQueryMapBuilder;
11
+ exports.BaseQueryBuilder = BaseQueryBuilder.BaseQueryBuilder;
12
12
  exports.conditionalize = conditionalize.conditionalize;
13
13
  exports.EntityManager = EntityManager.EntityManager;
package/dist/index.d.ts CHANGED
@@ -905,11 +905,11 @@ declare class EntityManager<M extends EntityMap, HashKey extends string, RangeKe
905
905
  }
906
906
 
907
907
  /**
908
- * Constructor options for {@link BaseShardQueryMapBuilder | `BaseShardQueryMapBuilder`}.
908
+ * Constructor options for {@link BaseQueryBuilder | `BaseQueryBuilder`}.
909
909
  *
910
910
  * @category ShardQueryMapBuilder
911
911
  */
912
- interface BaseShardQueryMapBuilderOptions<EntityClient extends BaseEntityClient, EntityToken extends keyof Exactify<M> & string, M extends EntityMap, HashKey extends string, RangeKey extends string, T extends TranscodeMap> {
912
+ interface BaseQueryBuilderOptions<EntityClient extends BaseEntityClient, EntityToken extends keyof Exactify<M> & string, M extends EntityMap, HashKey extends string, RangeKey extends string, T extends TranscodeMap> {
913
913
  /** {@link BaseEntityClient | `EntityClient`} instance. */
914
914
  entityClient: EntityClient;
915
915
  /** {@link EntityManager | `EntityManager`} instance. */
@@ -922,14 +922,14 @@ interface BaseShardQueryMapBuilderOptions<EntityClient extends BaseEntityClient,
922
922
  pageKeyMap?: string;
923
923
  }
924
924
 
925
- type ShardQueryMapBuilderQueryOptions<Item extends ItemMap<M, HashKey, RangeKey>[EntityToken], EntityToken extends keyof Exactify<M> & string, M extends EntityMap, HashKey extends string, RangeKey extends string> = Omit<QueryOptions<Item, EntityToken, M, HashKey, RangeKey>, 'entityToken' | 'pageKeyMap' | 'shardQueryMap'>;
925
+ type QueryBuilderQueryOptions<Item extends ItemMap<M, HashKey, RangeKey>[EntityToken], EntityToken extends keyof Exactify<M> & string, M extends EntityMap, HashKey extends string, RangeKey extends string> = Omit<QueryOptions<Item, EntityToken, M, HashKey, RangeKey>, 'entityToken' | 'pageKeyMap' | 'shardQueryMap'>;
926
926
 
927
927
  /**
928
928
  * Abstract base class supporting a fluent API for building a {@link ShardQueryMap | `ShardQueryMap`} using a database client.
929
929
  *
930
930
  * @category ShardQueryMapBuilder
931
931
  */
932
- declare abstract class BaseShardQueryMapBuilder<IndexParams, EntityClient extends BaseEntityClient, Item extends ItemMap<M, HashKey, RangeKey>[EntityToken], EntityToken extends keyof Exactify<M> & string, M extends EntityMap, HashKey extends string, RangeKey extends string, T extends TranscodeMap> {
932
+ declare abstract class BaseQueryBuilder<IndexParams, EntityClient extends BaseEntityClient, Item extends ItemMap<M, HashKey, RangeKey>[EntityToken], EntityToken extends keyof Exactify<M> & string, M extends EntityMap, HashKey extends string, RangeKey extends string, T extends TranscodeMap> {
933
933
  /** {@link BaseEntityClient | `EntityClient`} instance. */
934
934
  readonly entityClient: EntityClient;
935
935
  /** {@link EntityManager | `EntityManager`} instance. */
@@ -946,8 +946,8 @@ declare abstract class BaseShardQueryMapBuilder<IndexParams, EntityClient extend
946
946
  * @protected
947
947
  */
948
948
  readonly indexParamsMap: Record<string, IndexParams>;
949
- /** BaseShardQueryMapBuilder constructor. */
950
- constructor(options: BaseShardQueryMapBuilderOptions<EntityClient, EntityToken, M, HashKey, RangeKey, T>);
949
+ /** BaseQueryBuilder constructor. */
950
+ constructor(options: BaseQueryBuilderOptions<EntityClient, EntityToken, M, HashKey, RangeKey, T>);
951
951
  protected abstract getShardQueryFunction(indexToken: string): ShardQueryFunction<Item>;
952
952
  /**
953
953
  * Builds a {@link ShardQueryMap | `ShardQueryMap`} object.
@@ -955,7 +955,7 @@ declare abstract class BaseShardQueryMapBuilder<IndexParams, EntityClient extend
955
955
  * @returns - The {@link ShardQueryMap | `ShardQueryMap`} object.
956
956
  */
957
957
  build(): ShardQueryMap<Item>;
958
- query(options: ShardQueryMapBuilderQueryOptions<Item, EntityToken, M, HashKey, RangeKey>): Promise<QueryResult<Item, EntityToken, M, HashKey, RangeKey>>;
958
+ query(options: QueryBuilderQueryOptions<Item, EntityToken, M, HashKey, RangeKey>): Promise<QueryResult<Item, EntityToken, M, HashKey, RangeKey>>;
959
959
  }
960
960
 
961
961
  /**
@@ -971,4 +971,4 @@ declare abstract class BaseShardQueryMapBuilder<IndexParams, EntityClient extend
971
971
  */
972
972
  declare function conditionalize<F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, condition?: unknown): (...args: Parameters<F>) => ReturnType<F> | undefined;
973
973
 
974
- export { BaseEntityClient, type BaseEntityClientOptions, BaseShardQueryMapBuilder, type BaseShardQueryMapBuilderOptions, type Config, type ConfigEntities, type ConfigEntity, type ConfigEntityGenerated, type ConfigEntityIndexComponent, type ConfigKeys, type ConfigTranscodes, EntityManager, type EntityMap, type ExclusiveKey, type ItemMap, type ParsedConfig, type QueryOptions, type QueryResult, type ShardBump, type ShardQueryFunction, type ShardQueryMap, type ShardQueryMapBuilderQueryOptions, type ShardQueryResult, type Unwrap, conditionalize };
974
+ export { BaseEntityClient, type BaseEntityClientOptions, BaseQueryBuilder, type BaseQueryBuilderOptions, type Config, type ConfigEntities, type ConfigEntity, type ConfigEntityGenerated, type ConfigEntityIndexComponent, type ConfigKeys, type ConfigTranscodes, EntityManager, type EntityMap, type ExclusiveKey, type ItemMap, type ParsedConfig, type QueryBuilderQueryOptions, type QueryOptions, type QueryResult, type ShardBump, type ShardQueryFunction, type ShardQueryMap, type ShardQueryResult, type Unwrap, conditionalize };
@@ -5,8 +5,8 @@ import { mapValues } from 'radash';
5
5
  *
6
6
  * @category ShardQueryMapBuilder
7
7
  */
8
- class BaseShardQueryMapBuilder {
9
- /** BaseShardQueryMapBuilder constructor. */
8
+ class BaseQueryBuilder {
9
+ /** BaseQueryBuilder constructor. */
10
10
  constructor(options) {
11
11
  /**
12
12
  * Maps `indexToken` values to database platform-specific query parameters.
@@ -41,4 +41,4 @@ class BaseShardQueryMapBuilder {
41
41
  }
42
42
  }
43
43
 
44
- export { BaseShardQueryMapBuilder };
44
+ export { BaseQueryBuilder };
package/dist/mjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { BaseEntityClient } from './BaseEntityClient.js';
2
- export { BaseShardQueryMapBuilder } from './BaseShardQueryMapBuilder.js';
2
+ export { BaseQueryBuilder } from './BaseQueryBuilder.js';
3
3
  export { conditionalize } from './conditionalize.js';
4
4
  export { EntityManager } from './EntityManager.js';
package/package.json CHANGED
@@ -132,5 +132,5 @@
132
132
  },
133
133
  "type": "module",
134
134
  "types": "dist/index.d.ts",
135
- "version": "6.7.4"
135
+ "version": "6.7.5"
136
136
  }