Skip to content

Commit

Permalink
Moved TODOs into github issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneGH committed Jan 14, 2025
1 parent ac10cdd commit de43f2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 54 deletions.
17 changes: 8 additions & 9 deletions TestDynamo/Client/Item.fs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ let buildUpdateConditionExpression
?|> Map.map either2Snd
|> Fetch.buildFetchExpression "Expected" "ConditionExpression" "ue" op expression

let private sizeEstimateRangeGB =
[| fstT Settings.TransactWriteSettings.SizeRangeEstimateResponse
sndT Settings.TransactWriteSettings.SizeRangeEstimateResponse |] |> ValueSome

let private itemCollectionMetrics v =
{ ItemCollectionKey = ValueSome v
SizeEstimateRangeGB = sizeEstimateRangeGB }: ItemCollectionMetrics<AttributeValue>

module Put =

let input (req: PutItemRequest<_>): PutItemArgs<Map<string,_>> =
Expand All @@ -57,7 +65,6 @@ module Put =
expressionAttrNames = req.ExpressionAttributeNames ?|? Map.empty |> addNames
expressionAttrValues = req.ExpressionAttributeValues ?|? Map.empty |> addValues } } : PutItemArgs<_>

// 'a -> Map<string,AttributeValue> voption -> PutItemResponse
let output databaseId (attributes: Map<string,_> voption): PutItemResponse<_> =

{ Attributes = attributes
Expand Down Expand Up @@ -385,14 +392,6 @@ module Transact =
idempotencyKey = req.ClientRequestToken |> noneifyStrings
conditionCheck = condition |> Maybe.traverse |> List.ofSeq } : Database.TransactWrite.TransactWrites

let private sizeEstimateRangeGB =
[| fstT Settings.TransactWriteSettings.SizeRangeEstimateResponse
sndT Settings.TransactWriteSettings.SizeRangeEstimateResponse |] |> ValueSome

let private itemCollectionMetrics v =
{ ItemCollectionKey = ValueSome v
SizeEstimateRangeGB = sizeEstimateRangeGB }: ItemCollectionMetrics<AttributeValue>

let output _ (modifiedTables: Map<string, Map<string, AttributeValue> list>): TransactWriteItemsResponse<AttributeValue> =

let metrics =
Expand Down
11 changes: 5 additions & 6 deletions TestDynamo/Model/Compiler.PrecedenceProcessor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,13 @@ module PrecedenceProcessor =
| head::_ when head.fromToken = from && head.toToken = ``to`` -> ValueSome head
| _::tail -> isProcessed' from ``to`` tail

// O(N) operation on an ever shinking number of nodes
// probaly does not need to be optimised for small collections
let alreadyProcessed from ``to`` =
function
| Pp { processed = processed } -> isProcessed' from ``to`` processed
// O(N) operation on an ever shrinking number of nodes
// probably does not need to be optimised for small collections
let alreadyProcessed from ``to`` (Pp { processed = processed }) =
isProcessed' from ``to`` processed

/// <summary>
/// Put a tokenization reuslt into the processor, replacing
/// Put a tokenization result into the processor, replacing
/// any tokens or other results which were in its place
/// </summary>
let put =
Expand Down
38 changes: 0 additions & 38 deletions TestDynamo/TODO.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/TestDynamo.Tests/MappingTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ type MappingTests(output: ITestOutputHelper) =
TestDynamo.GeneratedCode.Dtos.QueryRequest<AttributeValue>> data

// assert
// Assert.NotNull(data.Statements) - todo Dynamodb v3 only
Assert.Equal(ValueNone, result.AttributesToGet)

[<Fact>]
Expand Down

0 comments on commit de43f2a

Please sign in to comment.