Type Alias Config<M, HashKey, RangeKey, T>

Config<M, HashKey, RangeKey, T>: ([keyof Exactify<M>] extends [never]
    ? ConfigKeys<M, HashKey, RangeKey, T>
    : Required<ConfigKeys<M, HashKey, RangeKey, T>>) & {
    generatedKeyDelimiter?: string;
    generatedValueDelimiter?: string;
    shardKeyDelimiter?: string;
    throttle?: number;
} & ([keyof Exactify<T>] extends [never]
    ? {
        transcodes?: ConfigTranscodes<T>;
    }
    : DefaultTranscodeMap extends T
        ? {
            transcodes?: ConfigTranscodes<T>;
        }
        : {
            transcodes: ConfigTranscodes<T>;
        })

EntityManager Config type.

Type Parameters

  • M extends EntityMap = Record<string, never>

    The EntityMap type that identitfies the Entity & related property types to be managed by EntityManager.

  • HashKey extends string = "hashKey"

    The property used across the configuration to store an Entity's sharded hash key. Should be configured as the table hash key. Must not conflict with any Entity property. Defaults to 'hashKey'.

  • RangeKey extends string = "rangeKey"

    The property used across the configuration to store an Entity's range key. Should be configured as the table range key. Must not conflict with any Entity property. Defaults to 'rangeKey'.

  • T extends TranscodeMap = DefaultTranscodeMap

    The TranscodeMap identifying transcodable property types. Only Entity properties of these types can be components of an index or a generated property. Defaults to DefaultTranscodeMap.

Type declaration

  • OptionalgeneratedKeyDelimiter?: string

    Defines the delimiter used to separate key-value pairs in a generated property value.

    Must consist of one or more non-word characters, and must not intersect with generatedValueDelimiter or shardKeyDelimiter.

    '|'

  • OptionalgeneratedValueDelimiter?: string

    Defines the delimiter used to separate keys & values in a generated property value.

    Must consist of one or more non-word characters, and must not intersect with generatedKeyDelimiter or shardKeyDelimiter.

    '#'

  • OptionalshardKeyDelimiter?: string

    Defines the delimiter used to construct an Entity's hashKey value from its Entity key and shard key.

    Must consist of one or more non-word characters, and must not intersect with generatedKeyDelimiter or generatedValueDelimiter.

    '!'

  • Optionalthrottle?: number

    The default maximum number of shards to query in parallel. Can be overridden at QueryOptions.throttle.

    10

entities is optional if M is empty.