Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 8 additions & 30 deletions sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,51 +289,29 @@ public IMultiTableBatchWrite CreateMultiTableBatchWrite(params IBatchWrite[] bat

#region TransactGet

/// <summary>
/// Creates a strongly-typed TransactGet object, allowing
/// a transactional get operation against DynamoDB.
/// </summary>
/// <typeparam name="T">Type of objects to get.</typeparam>
/// <returns>Empty strongly-typed TransactGet object.</returns>
public TransactGet<T> CreateTransactGet<T>()
/// <inheritdoc/>
public ITransactGet<T> CreateTransactGet<T>()
{
return CreateTransactGet<T>((TransactGetConfig)null);
}

/// <summary>
/// Creates a strongly-typed TransactGet object, allowing
/// a transactional get operation against DynamoDB.
/// </summary>
/// <typeparam name="T">Type of objects to get.</typeparam>
/// <param name="operationConfig">Config object which can be used to override that table used.</param>
/// <returns>Empty strongly-typed TransactGet object.</returns>
/// <inheritdoc/>
[Obsolete("Use the CreateTransactGet overload that takes TransactGetConfig instead, since DynamoDBOperationConfig contains properties that are not applicable to BatchGet.")]
public TransactGet<T> CreateTransactGet<T>(DynamoDBOperationConfig operationConfig)
public ITransactGet<T> CreateTransactGet<T>(DynamoDBOperationConfig operationConfig)
{
DynamoDBFlatConfig config = new DynamoDBFlatConfig(operationConfig, this.Config);
return new TransactGet<T>(this, config);
}

/// <summary>
/// Creates a strongly-typed TransactGet object, allowing
/// a transactional get operation against DynamoDB.
/// </summary>
/// <typeparam name="T">Type of objects to get.</typeparam>
/// <param name="transactGetConfig">Config object that can be used to override properties on the table's context for this request.</param>
/// <returns>Empty strongly-typed TransactGet object.</returns>
public TransactGet<T> CreateTransactGet<T>(TransactGetConfig transactGetConfig)
/// <inheritdoc/>
public ITransactGet<T> CreateTransactGet<T>(TransactGetConfig transactGetConfig)
{
DynamoDBFlatConfig config = new DynamoDBFlatConfig(transactGetConfig?.ToDynamoDBOperationConfig(), this.Config);
return new TransactGet<T>(this, config);
}

/// <summary>
/// Creates a MultiTableTransactGet object, composed of multiple
/// individual TransactGet objects.
/// </summary>
/// <param name="transactionParts">Individual TransactGet objects.</param>
/// <returns>Composite MultiTableTransactGet object.</returns>
public MultiTableTransactGet CreateMultiTableTransactGet(params TransactGet[] transactionParts)
/// <inheritdoc/>
public IMultiTableTransactGet CreateMultiTableTransactGet(params ITransactGet[] transactionParts)
{
return new MultiTableTransactGet(transactionParts);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public partial interface IDynamoDBContext : IDisposable
/// </summary>
/// <typeparam name="T">Type of objects to get.</typeparam>
/// <returns>Empty strongly-typed TransactGet object.</returns>
TransactGet<T> CreateTransactGet<T>();
ITransactGet<T> CreateTransactGet<T>();

/// <summary>
/// Creates a strongly-typed TransactGet object, allowing
Expand All @@ -287,7 +287,7 @@ public partial interface IDynamoDBContext : IDisposable
/// <param name="operationConfig">Config object which can be used to override that table used.</param>
/// <returns>Empty strongly-typed TransactGet object.</returns>
[Obsolete("Use the CreateTransactGet overload that takes TransactGetConfig instead, since DynamoDBOperationConfig contains properties that are not applicable to BatchGet.")]
TransactGet<T> CreateTransactGet<T>(DynamoDBOperationConfig operationConfig = null);
ITransactGet<T> CreateTransactGet<T>(DynamoDBOperationConfig operationConfig = null);

/// <summary>
/// Creates a strongly-typed TransactGet object, allowing
Expand All @@ -296,15 +296,15 @@ public partial interface IDynamoDBContext : IDisposable
/// <typeparam name="T">Type of objects to get.</typeparam>
/// <param name="transactGetConfig">Config object that can be used to override properties on the table's context for this request.</param>
/// <returns>Empty strongly-typed TransactGet object.</returns>
TransactGet<T> CreateTransactGet<T>(TransactGetConfig transactGetConfig);
ITransactGet<T> CreateTransactGet<T>(TransactGetConfig transactGetConfig);

/// <summary>
/// Creates a MultiTableTransactGet object, composed of multiple
/// individual TransactGet objects.
/// </summary>
/// <param name="transactionParts">Individual TransactGet objects.</param>
/// <returns>Composite MultiTableTransactGet object.</returns>
MultiTableTransactGet CreateMultiTableTransactGet(params TransactGet[] transactionParts);
IMultiTableTransactGet CreateMultiTableTransactGet(params ITransactGet[] transactionParts);

#endregion

Expand Down
Loading