@setho/dynamodb-repository
Version:
DynamoDB repository for hash-key and hash-key/range indexed tables. Designed for Lambda use. Handles nice-to-haves like created and updated timestamps and default id creation.
22 lines (21 loc) • 537 B
TypeScript
export type ExpressionBuilderResult = {
updateExpression: string;
expressionAttributeNames: {
[key: string]: string;
};
expressionAttributeValues: {
[key: string]: any;
};
};
export declare class UpdateExpressionsBuilder {
private keyName;
constructor(keyName: string);
buildExpressionNames(item: any): {
[key: string]: string;
};
buildExpressionValues(item: any): {
[key: string]: any;
};
buildUpdateExpression(item: any): string;
private removeKey;
}