Skip to content

Commit de212e6

Browse files
chore(tasks): classify of TODO and FIXME tasks
1 parent a403cde commit de212e6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/dynamo/expression/condition-expression-builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function buildDefaultConditionExpression(
228228
let attribute: Attribute | null
229229
switch (operator) {
230230
case 'contains':
231-
// TODO think about validation
231+
// TODO LOW:VALIDATION think about concept
232232
// validateValueForContains(values[0], propertyMetadata)
233233
attribute = toDbOne(values[0], propertyMetadata)
234234
break
@@ -300,14 +300,14 @@ function validateValues(operator: ConditionOperator, values?: any[]) {
300300
}
301301
}
302302

303-
// TODO should we support other types than String, Number, Binary (can we search a boolean set for example with boolean as string?)
303+
// TODO LOW:VALIDATION should we support other types than String, Number, Binary (can we search a boolean set for example with boolean as string?)
304304
// private static validateValueForContains(value: any, propertyMetadata?: PropertyMetadata<any>): { S: string } {
305305
// let finalValue: { S: string }
306306
// if (propertyMetadata && propertyMetadata.typeInfo) {
307307
// switch (propertyMetadata.typeInfo.type) {
308308
// case Array:
309309
// case Set:
310-
// // FIXME REVIEW the validation logic
310+
// // TODO LOW:VALIDATION REVIEW the validation logic
311311
// // const genericType = propertyMetadata.typeInfo.genericType
312312
// // if ((!genericType && (typeof value === 'number' || typeof value === 'string' || typeof value === '')) || (
313313
// // genericType &&

src/dynamo/expression/type/update-expression-definition-chain.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { UpdateExpressionDefinitionFunction } from './update-expression-definiti
55
*/
66
export interface UpdateExpressionDefinitionChainTyped<T, K extends keyof T> {
77
/* ----------------------------------------------------------------
8-
SET operation TODO add support for ifNotExists
8+
SET operation TODO add support for ifNotExists (#16)
99
---------------------------------------------------------------- */
1010
incrementBy: (value: number) => UpdateExpressionDefinitionFunction
1111
decrementBy: (value: number) => UpdateExpressionDefinitionFunction
@@ -67,7 +67,7 @@ export interface UpdateExpressionDefinitionChainTyped<T, K extends keyof T> {
6767
*/
6868
export interface UpdateExpressionDefinitionChain {
6969
/* ----------------------------------------------------------------
70-
SET operation TODO add support for ifNotExists
70+
SET operation TODO add support for ifNotExists (#16)
7171
---------------------------------------------------------------- */
7272
incrementBy: (value: number) => UpdateExpressionDefinitionFunction
7373
decrementBy: (value: number) => UpdateExpressionDefinitionFunction

src/dynamo/expression/update-expression-builder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function buildUpdateExpression(
2828
// metadata get rid of undefined values
2929
values = deepFilter(values, value => value !== undefined)
3030

31-
// TODO check if provided values are valid for given operation
31+
// TODO LOW:VALIDATION check if provided values are valid for given operation
3232
// validateValues(operation, values)
3333

3434
// load property metadata if model metadata was provided
@@ -106,9 +106,9 @@ function buildDefaultExpression(
106106
statement = values.map(pos => `${namePlaceholder}[${pos}]`).join(', ')
107107
break
108108
case 'add':
109-
// TODO add validation to make sure expressionAttributeValue to be N(umber) or S(et)
109+
// TODO LOW:VALIDATION add validation to make sure expressionAttributeValue to be N(umber) or S(et)
110110
statement = `${namePlaceholder} ${valuePlaceholder}`
111-
// TODO won't work for numbers, is always gonna be mapped to a collection type
111+
// TODO LOW:VALIDATION won't work for numbers, is always gonna be mapped to a collection type
112112
if ((values.length === 1 && Array.isArray(values[0])) || isSet(values[0])) {
113113
// dealing with arr | set as single argument
114114
} else {
@@ -117,7 +117,7 @@ function buildDefaultExpression(
117117
}
118118
break
119119
case 'removeFromSet':
120-
// TODO add validation to make sure expressionAttributeValue to be S(et)
120+
// TODO LOW:VALIDATION add validation to make sure expressionAttributeValue to be S(et)
121121
statement = `${namePlaceholder} ${valuePlaceholder}`
122122
if ((values.length === 1 && Array.isArray(values[0])) || isSet(values[0])) {
123123
// dealing with arr | set as single argument

src/dynamo/request/request.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export abstract class Request<T,
7474
return <any>this
7575
}
7676

77-
// TODO TYPING how can we improve the typing to define the accepted value for condition function (see
77+
// TODO LOW:TYPING how can we improve the typing to define the accepted value for condition function (see
7878
// update2.function)
7979
whereAttribute(attributePath: keyof T): RequestConditionFunction<R> {
8080
return addCondition('FilterExpression', <string>attributePath, <any>this, this.metadata)

0 commit comments

Comments
 (0)