## Index

### Type aliases

- BuildFilterFn

### Variables

- ERR_ARITY_DEFAULT
- ERR_ARITY_IN
- ERR_VALUES_BETWEEN_TYPE
- ERR_VALUES_IN

### Functions

- buildBetweenConditionExpression
- buildDefaultConditionExpression
- buildFilterExpression
- buildInConditionExpression
- deepFilter
- validateArity
- validateForOperator
- validateValues

## Type aliases

### BuildFilterFn

BuildFilterFn: function

- Defined in dynamo/expression/condition-expression-builder.ts:19

#### Type declaration

- - (attributePath: string, namePlaceholder: string, valuePlaceholder: string, attributeNames: Record<string, string>, values: any[], existingValueNames: string[] | undefined, propertyMetadata: PropertyMetadata<any> | undefined): Expression

  - #### Parameters

    - ##### attributePath: string

    - ##### namePlaceholder: string

    - ##### valuePlaceholder: string

    - ##### attributeNames: Record<string, string>

    - ##### values: any[]

    - ##### existingValueNames: string[] | undefined

    - ##### propertyMetadata: PropertyMetadata<any> | undefined

    #### Returns Expression

## Variables

### Const ERR_ARITY_DEFAULT

ERR_ARITY_DEFAULT: "expected ${parameterArity} value(s) for operator ${operator}, this is not the right amount of method parameters for this operator" = "expected ${parameterArity} value(s) for operator ${operator}, this is not the right amount of method parameters for this operator"

- Defined in dynamo/expression/condition-expression-builder.ts:311

### Const ERR_ARITY_IN

ERR_ARITY_IN: "expected ${parameterArity} value(s) for operator ${operator}, this is not the right amount of method parameters for this operator (IN operator requires one value of array type)" = "expected ${parameterArity} value(s) for operator ${operator}, this is not the right amount of method parameters for this operator (IN operator requires one value of array type)"

- Defined in dynamo/expression/condition-expression-builder.ts:309

### Const ERR_VALUES_BETWEEN_TYPE

ERR_VALUES_BETWEEN_TYPE: "both values for operator BETWEEN must have the same type, got ${value1} and ${value2}" = "both values for operator BETWEEN must have the same type, got ${value1} and ${value2}"

- Defined in dynamo/expression/condition-expression-builder.ts:342

### Const ERR_VALUES_IN

ERR_VALUES_IN: "the provided value for IN operator must be an array" = "the provided value for IN operator must be an array"

- Defined in dynamo/expression/condition-expression-builder.ts:344

## Functions

### buildBetweenConditionExpression

- buildBetweenConditionExpression(attributePath: string, namePlaceholder: string, valuePlaceholder: string, attributeNames: Record<string, string>, values: string[], existingValueNames: string[] | undefined, propertyMetadata: PropertyMetadata<any> | undefined): Expression

- - Defined in dynamo/expression/condition-expression-builder.ts:192

  #### Parameters

  - ##### attributePath: string

  - ##### namePlaceholder: string

  - ##### valuePlaceholder: string

  - ##### attributeNames: Record<string, string>

  - ##### values: string[]

  - ##### existingValueNames: string[] | undefined

  - ##### propertyMetadata: PropertyMetadata<any> | undefined

  #### Returns Expression

### buildDefaultConditionExpression

- buildDefaultConditionExpression(operator: ConditionOperator, attributePath: string, namePlaceholder: string, valuePlaceholder: string, attributeNames: Record<string, string>, values: any[], existingValueNames: string[] | undefined, propertyMetadata: PropertyMetadata<any> | undefined): Expression

- - Defined in dynamo/expression/condition-expression-builder.ts:223

  #### Parameters

  - ##### operator: ConditionOperator

  - ##### attributePath: string

  - ##### namePlaceholder: string

  - ##### valuePlaceholder: string

  - ##### attributeNames: Record<string, string>

  - ##### values: any[]

  - ##### existingValueNames: string[] | undefined

  - ##### propertyMetadata: PropertyMetadata<any> | undefined

  #### Returns Expression

### buildFilterExpression

- buildFilterExpression(attributePath: string, operator: ConditionOperator, values: any[], existingValueNames: string[] | undefined, metadata: Metadata<any> | undefined): Expression

- - Defined in dynamo/expression/condition-expression-builder.ts:95

  Will create a condition which can be added to a request using the param object. It will create the expression statement and the attribute names and values.

  #### Parameters

  - ##### attributePath: string

  - ##### operator: ConditionOperator

  - ##### values: any[]

    Depending on the operator the amount of values differs

  - ##### existingValueNames: string[] | undefined

    If provided the existing names are used to make sure we have a unique name for the current attributePath

  - ##### metadata: Metadata<any> | undefined

    If provided we use the metadata to define the attribute name and use it to map the given value(s) to attributeValue(s)

  #### Returns Expression

### buildInConditionExpression

- buildInConditionExpression(attributePath: string, namePlaceholder: string, valuePlaceholder: string, attributeNames: Record<string, string>, values: any[], existingValueNames: string[] | undefined, propertyMetadata: PropertyMetadata<any> | undefined): Expression

- - Defined in dynamo/expression/condition-expression-builder.ts:161

  IN expression is unlike all the others property the operand is an array of unwrapped values (not attribute values)

  #### Parameters

  - ##### attributePath: string

  - ##### namePlaceholder: string

  - ##### valuePlaceholder: string

  - ##### attributeNames: Record<string, string>

  - ##### values: any[]

  - ##### existingValueNames: string[] | undefined

  - ##### propertyMetadata: PropertyMetadata<any> | undefined

  #### Returns Expression

### deepFilter

- deepFilter(obj: any, filterFn: function): any

- - Defined in dynamo/expression/condition-expression-builder.ts:40

  Will walk the object tree recursively and removes all items which do not satisfy the filterFn

  #### Parameters

  - ##### obj: any

  - ##### filterFn: function

    - - (value: any): boolean

      - #### Parameters

        - ##### value: any

        #### Returns boolean

  #### Returns any

### validateArity

- validateArity(operator: ConditionOperator, values?: any[]): void

- - Defined in dynamo/expression/condition-expression-builder.ts:316

  #### Parameters

  - ##### operator: ConditionOperator

  - ##### Optional values: any[]

  #### Returns void

### validateForOperator

- validateForOperator(operator: ConditionOperator, values?: any[]): void

- - Defined in dynamo/expression/condition-expression-builder.ts:288

  Every operator requires a predefined arity of parameters, this method checks for the correct arity and throws an Error if not correct

  throws

    {Error} error Throws an error if the amount of values won't match the operator function parameter arity or the given values is not an array

  #### Parameters

  - ##### operator: ConditionOperator

  - ##### Optional values: any[]

    The values which will be applied to the operator function implementation, not every operator requires values

  #### Returns void

### validateValues

- validateValues(operator: ConditionOperator, values: any[]): void

- - Defined in dynamo/expression/condition-expression-builder.ts:352

  Every operator has some constraints about the values it supports, this method makes sure everything is fine for given operator and values

  #### Parameters

  - ##### operator: ConditionOperator

  - ##### values: any[]

  #### Returns void

Generated using TypeDoc