@@ -98,39 +98,34 @@ public extension AWSDynamoDBCompositePrimaryKeyTable {
9898 }
9999
100100 func polymorphicQuery< ReturnedType: PolymorphicOperationReturnType > ( forPartitionKey partitionKey: String ,
101- sortKeyCondition: AttributeCondition ? ,
102- consistentRead: Bool ) async throws
101+ sortKeyCondition: AttributeCondition ? ) async throws
103102 -> [ ReturnedType ]
104103 {
105104 try await self . polymorphicPartialQuery ( forPartitionKey: partitionKey,
106105 sortKeyCondition: sortKeyCondition,
107- exclusiveStartKey: nil ,
108- consistentRead: consistentRead)
106+ exclusiveStartKey: nil )
109107 }
110108
111109 // function to return a future with the results of a query call and all future paginated calls
112110 private func polymorphicPartialQuery< ReturnedType: PolymorphicOperationReturnType > (
113111 forPartitionKey partitionKey: String ,
114112 sortKeyCondition: AttributeCondition ? ,
115- exclusiveStartKey: String ? ,
116- consistentRead: Bool ) async throws -> [ ReturnedType ]
113+ exclusiveStartKey: String ? ) async throws -> [ ReturnedType ]
117114 {
118115 let paginatedItems : ( [ ReturnedType ] , String ? ) =
119116 try await polymorphicQuery ( forPartitionKey: partitionKey,
120117 sortKeyCondition: sortKeyCondition,
121118 limit: nil ,
122119 scanIndexForward: true ,
123- exclusiveStartKey: exclusiveStartKey,
124- consistentRead: consistentRead)
120+ exclusiveStartKey: exclusiveStartKey)
125121
126122 // if there are more items
127123 if let lastEvaluatedKey = paginatedItems. 1 {
128124 // returns a future with all the results from all later paginated calls
129125 let partialResult : [ ReturnedType ] = try await self . polymorphicPartialQuery (
130126 forPartitionKey: partitionKey,
131127 sortKeyCondition: sortKeyCondition,
132- exclusiveStartKey: lastEvaluatedKey,
133- consistentRead: consistentRead)
128+ exclusiveStartKey: lastEvaluatedKey)
134129
135130 // return the results from 'this' call and all later paginated calls
136131 return paginatedItems. 0 + partialResult
@@ -143,32 +138,29 @@ public extension AWSDynamoDBCompositePrimaryKeyTable {
143138 func polymorphicQuery< ReturnedType: PolymorphicOperationReturnType > ( forPartitionKey partitionKey: String ,
144139 sortKeyCondition: AttributeCondition ? ,
145140 limit: Int ? ,
146- exclusiveStartKey: String ? ,
147- consistentRead: Bool ) async throws
141+ exclusiveStartKey: String ? ) async throws
148142 -> ( items: [ ReturnedType ] , lastEvaluatedKey: String ? )
149143 {
150144 try await self . polymorphicQuery ( forPartitionKey: partitionKey,
151145 sortKeyCondition: sortKeyCondition,
152146 limit: limit,
153147 scanIndexForward: true ,
154- exclusiveStartKey: exclusiveStartKey,
155- consistentRead: consistentRead)
148+ exclusiveStartKey: exclusiveStartKey)
156149 }
157150
158151 func polymorphicQuery< ReturnedType: PolymorphicOperationReturnType > ( forPartitionKey partitionKey: String ,
159152 sortKeyCondition: AttributeCondition ? ,
160153 limit: Int ? ,
161154 scanIndexForward: Bool ,
162- exclusiveStartKey: String ? ,
163- consistentRead: Bool ) async throws
155+ exclusiveStartKey: String ? ) async throws
164156 -> ( items: [ ReturnedType ] , lastEvaluatedKey: String ? )
165157 {
166158 let queryInput = try AWSDynamoDB . QueryInput. forSortKeyCondition ( partitionKey: partitionKey, targetTableName: targetTableName,
167159 primaryKeyType: ReturnedType . AttributesType. self,
168160 sortKeyCondition: sortKeyCondition, limit: limit,
169161 scanIndexForward: scanIndexForward,
170162 exclusiveStartKey: exclusiveStartKey,
171- consistentRead: consistentRead)
163+ consistentRead: self . tableConfiguration . consistentRead)
172164
173165 let logMessage = " dynamodb.query with partitionKey: \( partitionKey) , " +
174166 " sortKeyCondition: \( sortKeyCondition. debugDescription) , and table name \( targetTableName) . "
@@ -232,39 +224,34 @@ public extension AWSDynamoDBCompositePrimaryKeyTable {
232224 }
233225
234226 func query< AttributesType, ItemType, TimeToLiveAttributesType> ( forPartitionKey partitionKey: String ,
235- sortKeyCondition: AttributeCondition ? ,
236- consistentRead: Bool ) async throws
227+ sortKeyCondition: AttributeCondition ? ) async throws
237228 -> [ TypedTTLDatabaseItem < AttributesType , ItemType , TimeToLiveAttributesType > ]
238229 {
239230 try await self . partialQuery ( forPartitionKey: partitionKey,
240231 sortKeyCondition: sortKeyCondition,
241- exclusiveStartKey: nil ,
242- consistentRead: consistentRead)
232+ exclusiveStartKey: nil )
243233 }
244234
245235 // function to return a future with the results of a query call and all future paginated calls
246236 private func partialQuery< AttributesType, ItemType, TimeToLiveAttributesType> (
247237 forPartitionKey partitionKey: String ,
248238 sortKeyCondition: AttributeCondition ? ,
249- exclusiveStartKey _: String ? ,
250- consistentRead: Bool ) async throws -> [ TypedTTLDatabaseItem < AttributesType , ItemType , TimeToLiveAttributesType > ]
239+ exclusiveStartKey _: String ? ) async throws -> [ TypedTTLDatabaseItem < AttributesType , ItemType , TimeToLiveAttributesType > ]
251240 {
252241 let paginatedItems : ( [ TypedTTLDatabaseItem < AttributesType , ItemType , TimeToLiveAttributesType > ] , String ? ) =
253242 try await query ( forPartitionKey: partitionKey,
254243 sortKeyCondition: sortKeyCondition,
255244 limit: nil ,
256245 scanIndexForward: true ,
257- exclusiveStartKey: nil ,
258- consistentRead: consistentRead)
246+ exclusiveStartKey: nil )
259247
260248 // if there are more items
261249 if let lastEvaluatedKey = paginatedItems. 1 {
262250 // returns a future with all the results from all later paginated calls
263251 let partialResult : [ TypedTTLDatabaseItem < AttributesType , ItemType , TimeToLiveAttributesType > ] = try await self . partialQuery (
264252 forPartitionKey: partitionKey,
265253 sortKeyCondition: sortKeyCondition,
266- exclusiveStartKey: lastEvaluatedKey,
267- consistentRead: consistentRead)
254+ exclusiveStartKey: lastEvaluatedKey)
268255
269256 // return the results from 'this' call and all later paginated calls
270257 return paginatedItems. 0 + partialResult
@@ -278,16 +265,15 @@ public extension AWSDynamoDBCompositePrimaryKeyTable {
278265 sortKeyCondition: AttributeCondition ? ,
279266 limit: Int ? ,
280267 scanIndexForward: Bool ,
281- exclusiveStartKey: String ? ,
282- consistentRead: Bool ) async throws
268+ exclusiveStartKey: String ? ) async throws
283269 -> ( items: [ TypedTTLDatabaseItem < AttributesType , ItemType , TimeToLiveAttributesType > ] , lastEvaluatedKey: String ? )
284270 {
285271 let queryInput = try AWSDynamoDB . QueryInput. forSortKeyCondition (
286272 partitionKey: partitionKey, targetTableName: targetTableName,
287273 primaryKeyType: AttributesType . self,
288274 sortKeyCondition: sortKeyCondition, limit: limit,
289275 scanIndexForward: scanIndexForward, exclusiveStartKey: exclusiveStartKey,
290- consistentRead: consistentRead)
276+ consistentRead: self . tableConfiguration . consistentRead)
291277
292278 let logMessage = " dynamodb.query with partitionKey: \( partitionKey) , " +
293279 " sortKeyCondition: \( sortKeyCondition. debugDescription) , and table name \( targetTableName) . "
0 commit comments