@@ -30,34 +30,37 @@ this KeyConditionExpression<T, TArg, TReferences, TArgumentReferences> source
30
30
) ;
31
31
}
32
32
33
- public static GetItemRequestBuilder < TPartition > ToGetRequestBuilder < T , TArg , TReferences , TArgumentReferences , TPartition > (
33
+ public static GetItemRequestBuilder < TArg > ToGetRequestBuilder < T , TArg , TReferences , TArgumentReferences ,
34
+ TPartition > (
34
35
this TableAccess < T , TArg , TReferences , TArgumentReferences > source ,
35
- // ReSharper disable once UnusedParameter.Global is used to determined typing
36
- Func < T , TPartition > partitionKeySelector )
36
+ Func < TArg , TPartition > partitionKeySelector )
37
37
where TReferences : IAttributeExpressionNameTracker
38
38
where TArgumentReferences : IAttributeExpressionValueTracker < TArg >
39
39
where TPartition : notnull
40
40
{
41
- return new GetItemRequestBuilder < TPartition > ( source . TableName , source . Item . PrimaryKeyMarshaller ,
42
- ( x , y ) => x . PartitionKey ( y ) ) ;
41
+ return new GetItemRequestBuilder < TArg > (
42
+ source . TableName ,
43
+ source . Item . PrimaryKeyMarshaller . ComposeKeys < TArg > ( y => partitionKeySelector ( y ) , null )
44
+ ) ;
43
45
}
44
46
45
- public static GetItemRequestBuilder < ( TPartition partionKey , TRange rangeKey ) > ToGetRequestBuilder < T , TArg ,
47
+ public static GetItemRequestBuilder < TArg > ToGetRequestBuilder < T , TArg ,
46
48
TReferences , TArgumentReferences , TPartition , TRange > (
47
49
this TableAccess < T , TArg , TReferences , TArgumentReferences > source ,
48
- // ReSharper disable once UnusedParameter.Global is used to determined typing
49
- Func < T , TPartition > partitionKeySelector ,
50
- // ReSharper disable once UnusedParameter.Global is used to determined typing
51
- Func < T , TRange > rangeKeySelector )
50
+ Func < TArg , TPartition > partitionKeySelector ,
51
+ Func < TArg , TRange > rangeKeySelector )
52
52
where TReferences : IAttributeExpressionNameTracker
53
53
where TArgumentReferences : IAttributeExpressionValueTracker < TArg >
54
54
where TPartition : notnull
55
55
where TRange : notnull
56
56
{
57
- return new GetItemRequestBuilder < ( TPartition partionKey , TRange rangeKey ) > ( source . TableName ,
58
- source . Item . PrimaryKeyMarshaller , ( x , y ) => x . Keys ( y . partionKey , y . rangeKey ) ) ;
57
+ return new GetItemRequestBuilder < TArg > (
58
+ source . TableName ,
59
+ source . Item . PrimaryKeyMarshaller . ComposeKeys < TArg > ( y => partitionKeySelector ( y ) , y => rangeKeySelector ( y ) )
60
+ ) ;
59
61
}
60
62
63
+
61
64
public static UpdateRequestBuilder < TArg > ToUpdateItemRequestBuilder < T , TArg , TReferences , TArgumentReferences > (
62
65
this UpdateExpression < T , TArg , TReferences , TArgumentReferences > source ,
63
66
Func < IDynamoDBKeyMarshaller , TArg , Dictionary < string , AttributeValue > > keySelector
0 commit comments