diff --git a/src/db/resource-table.ts b/src/db/resource-table.ts index 8ce2f52..b30d7f4 100644 --- a/src/db/resource-table.ts +++ b/src/db/resource-table.ts @@ -165,12 +165,39 @@ export class ResourceTableBuilder { this.tableName, this.resourceType, { + ...this.props, + transform: undefined, hashTransform: hashTransform, sortTransform: sortTransform } ); } + withoutIncludedMeta() { + return new ResourceTableBuilder( + this.dynamoDBClient, + this.tableName, + this.resourceType, + { + ...this.props, + doNotIncludeMeta: true + } + ); + } + + withoutIncludedKeys() { + return new ResourceTableBuilder( + this.dynamoDBClient, + this.tableName, + this.resourceType, + { + ...this.props, + doNotIncludeKeys: true + } + ); + } + + withTransform( transform: (key: H & S, attr: A) => any ) { @@ -179,8 +206,7 @@ export class ResourceTableBuilder { this.tableName, this.resourceType, { - hashTransform: this.props.hashTransform, - sortTransform: this.props.sortTransform, + ...this.props, transform } );