Skip to content

Commit bceb8d9

Browse files
authored
implement expression builders (#3761)
1 parent 12b39b9 commit bceb8d9

File tree

5 files changed

+2233
-22
lines changed

5 files changed

+2233
-22
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "DynamoDBv2",
5+
"type": "minor",
6+
"changeLogMessages": [
7+
"Introduce a fluent ExpressionBuilder to the Document Model that uses method chaining to construct type-safe, readable condition and update expressions."
8+
]
9+
}
10+
]
11+
}

sdk/src/Services/DynamoDBv2/Custom/DataModel/_async/IDynamoDBContext.Async.cs

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -313,17 +313,15 @@ partial interface IDynamoDBContext
313313
Task DeleteAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T value, DeleteConfig deleteConfig, CancellationToken cancellationToken = default);
314314

315315
/// <summary>
316-
/// Deletes an item in DynamoDB corresponding to given hash key.
317-
/// </summary>
318-
/// <remarks>
319-
/// If SkipVersionCheck if false, it will check the version of object before deleting.
320-
/// The type must be marked up with <see cref="DynamoDBTableAttribute" /> and at least
321-
/// one public field/property with <see cref="DynamoDBHashKeyAttribute" />.
322-
/// </remarks>
323-
/// <typeparam name="T">Type of object.</typeparam>
324-
/// <param name="hashKey">Hash key element of the object to delete.</param>
325-
/// <param name="cancellationToken">Token which can be used to cancel the task.</param>
326-
/// <returns>A Task that can be used to poll or wait for results, or both.</returns>
316+
/// Deletes an item in DynamoDB corresponding to the given hash key.
317+
/// </summary>
318+
/// <typeparam name="T">
319+
/// The type representing the item stored in DynamoDB. It must be resolvable via table metadata,
320+
/// either from attributes or via configuration.
321+
/// </typeparam>
322+
/// <param name="hashKey">The value of the hash (partition) key identifying the item to delete.</param>
323+
/// <param name="cancellationToken">Token that can be used to cancel the operation.</param>
324+
/// <returns>A <see cref="Task"/> that can be awaited for operation completion.</returns>
327325
Task DeleteAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(object hashKey, CancellationToken cancellationToken = default);
328326

329327
/// <summary>
@@ -334,8 +332,11 @@ partial interface IDynamoDBContext
334332
/// The type must be marked up with <see cref="DynamoDBTableAttribute" /> and at least
335333
/// one public field/property with <see cref="DynamoDBHashKeyAttribute" />.
336334
/// </remarks>
337-
/// <typeparam name="T">Type of object.</typeparam>
338-
/// <param name="hashKey">Hash key element of the object to delete.</param>
335+
/// <typeparam name="T">
336+
/// The type representing the item stored in DynamoDB. It must be resolvable via table metadata,
337+
/// either from attributes or via configuration.
338+
/// </typeparam>
339+
/// <param name="hashKey">The value of the hash (partition) key identifying the item to delete.</param>
339340
/// <param name="operationConfig">Config object which can be used to override that table used.</param>
340341
/// <param name="cancellationToken">Token which can be used to cancel the task.</param>
341342
/// <returns>A Task that can be used to poll or wait for results, or both.</returns>
@@ -350,8 +351,11 @@ partial interface IDynamoDBContext
350351
/// The type must be marked up with <see cref="DynamoDBTableAttribute" /> and at least
351352
/// one public field/property with <see cref="DynamoDBHashKeyAttribute" />.
352353
/// </remarks>
353-
/// <typeparam name="T">Type of object.</typeparam>
354-
/// <param name="hashKey">Hash key element of the object to delete.</param>
354+
/// <typeparam name="T">
355+
/// The type representing the item stored in DynamoDB. It must be resolvable via table metadata,
356+
/// either from attributes or via configuration.
357+
/// </typeparam>
358+
/// <param name="hashKey">The value of the hash (partition) key identifying the item to delete.</param>
355359
/// <param name="deleteConfig">Config object that can be used to override properties on the table's context for this request.</param>
356360
/// <param name="cancellationToken">Token which can be used to cancel the task.</param>
357361
/// <returns>A Task that can be used to poll or wait for results, or both.</returns>
@@ -365,8 +369,11 @@ partial interface IDynamoDBContext
365369
/// The type must be marked up with <see cref="DynamoDBTableAttribute" /> and at least
366370
/// one public field/property with <see cref="DynamoDBHashKeyAttribute" />.
367371
/// </remarks>
368-
/// <typeparam name="T">Type of object.</typeparam>
369-
/// <param name="hashKey">Hash key element of the object to delete.</param>
372+
/// <typeparam name="T">
373+
/// The type representing the item stored in DynamoDB. It must be resolvable via table metadata,
374+
/// either from attributes or via configuration.
375+
/// </typeparam>
376+
/// <param name="hashKey">The value of the hash (partition) key identifying the item to delete.</param>
370377
/// <param name="rangeKey">Range key element of the object to delete.</param>
371378
/// <param name="cancellationToken">Token which can be used to cancel the task.</param>
372379
/// <returns>A Task that can be used to poll or wait for results, or both.</returns>
@@ -380,8 +387,11 @@ partial interface IDynamoDBContext
380387
/// The type must be marked up with <see cref="DynamoDBTableAttribute" /> and at least
381388
/// one public field/property with <see cref="DynamoDBHashKeyAttribute" />.
382389
/// </remarks>
383-
/// <typeparam name="T">Type of object.</typeparam>
384-
/// <param name="hashKey">Hash key element of the object to delete.</param>
390+
/// <typeparam name="T">
391+
/// The type representing the item stored in DynamoDB. It must be resolvable via table metadata,
392+
/// either from attributes or via configuration.
393+
/// </typeparam>
394+
/// <param name="hashKey">The value of the hash (partition) key identifying the item to delete.</param>
385395
/// <param name="rangeKey">Range key element of the object to delete.</param>
386396
/// <param name="operationConfig">Config object which can be used to override that table used.</param>
387397
/// <param name="cancellationToken">Token which can be used to cancel the task.</param>
@@ -397,8 +407,11 @@ partial interface IDynamoDBContext
397407
/// The type must be marked up with <see cref="DynamoDBTableAttribute" /> and at least
398408
/// one public field/property with <see cref="DynamoDBHashKeyAttribute" />.
399409
/// </remarks>
400-
/// <typeparam name="T">Type of object.</typeparam>
401-
/// <param name="hashKey">Hash key element of the object to delete.</param>
410+
/// <typeparam name="T">
411+
/// The type representing the item stored in DynamoDB. It must be resolvable via table metadata,
412+
/// either from attributes or via configuration.
413+
/// </typeparam>
414+
/// <param name="hashKey">The value of the hash (partition) key identifying the item to delete.</param>
402415
/// <param name="rangeKey">Range key element of the object to delete.</param>
403416
/// <param name="deleteConfig">Config object that can be used to override properties on the table's context for this request.</param>
404417
/// <param name="cancellationToken">Token which can be used to cancel the task.</param>

0 commit comments

Comments
 (0)