Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(winglib): set default value for dynamodb winglib starting positio… #324

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dynamodb/dynamodb.tf-aws.w
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ pub class Table_tfaws impl dynamodb_types.ITable {
}

pub setStreamConsumer(handler: inflight (dynamodb_types.StreamRecord): void, options: dynamodb_types.StreamConsumerOptions?) {

let startingPosition = options?.startingPosition ?? "LATEST";

let consumer = new cloud.Function(inflight (eventStr) => {
let event: DynamoDBStreamEvent = unsafeCast(eventStr);
for record in event.Records {
Expand Down Expand Up @@ -120,7 +123,7 @@ pub class Table_tfaws impl dynamodb_types.ITable {
eventSourceArn: this.table.streamArn,
functionName: lambda.functionName,
batchSize: options?.batchSize,
startingPosition: options?.startingPosition,
startingPosition,
// filterCriteria: unsafeCast(options?.filterCriteria),
},
);
Expand Down
Loading