Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1044 Support to the DbRepository.ExecuteQueryMultiple. #1078

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions RepoDb.Core/RepoDb/DbRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -852,12 +852,17 @@ public async Task<TResult> ExecuteScalarAsync<TResult>(string commandText,
/// <see cref="ExpandoObject"/>, <see cref="QueryField"/>, <see cref="QueryGroup"/> and an enumerable of <see cref="QueryField"/> objects.
/// </param>
/// <param name="commandType">The command type to be used.</param>
/// <param name="cacheKey">
/// The key to the cache item. By setting this argument, it will return the item from the cache if present, otherwise it will query the database.
/// This will only work if the 'cache' argument is set.
/// </param>
/// <param name="commandTimeout">The command timeout in seconds to be used.</param>
/// <param name="transaction">The transaction to be used.</param>
/// <returns>An instance of <see cref="QueryMultipleExtractor"/> used to extract the results.</returns>
public QueryMultipleExtractor ExecuteQueryMultiple(string commandText,
object param = null,
CommandType? commandType = null,
string cacheKey = null,
int? commandTimeout = null,
IDbTransaction transaction = null)
{
Expand All @@ -874,8 +879,11 @@ public QueryMultipleExtractor ExecuteQueryMultiple(string commandText,
return connection.ExecuteQueryMultipleInternal(commandText: commandText,
param: param,
commandType: commandType,
cacheKey: cacheKey,
cacheItemExpiration: CacheItemExpiration,
commandTimeout: commandTimeout,
transaction: transaction,
cache: Cache,
isDisposeConnection: isDisposeConnection);
}

Expand All @@ -892,13 +900,18 @@ public QueryMultipleExtractor ExecuteQueryMultiple(string commandText,
/// <see cref="ExpandoObject"/>, <see cref="QueryField"/>, <see cref="QueryGroup"/> and an enumerable of <see cref="QueryField"/> objects.
/// </param>
/// <param name="commandType">The command type to be used.</param>
/// <param name="cacheKey">
/// The key to the cache item. By setting this argument, it will return the item from the cache if present, otherwise it will query the database.
/// This will only work if the 'cache' argument is set.
/// </param>
/// <param name="commandTimeout">The command timeout in seconds to be used.</param>
/// <param name="transaction">The transaction to be used.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> object to be used during the asynchronous operation.</param>
/// <returns>An instance of <see cref="QueryMultipleExtractor"/> used to extract the results.</returns>
public Task<QueryMultipleExtractor> ExecuteQueryMultipleAsync(string commandText,
object param = null,
CommandType? commandType = null,
string cacheKey = null,
int? commandTimeout = null,
IDbTransaction transaction = null,
CancellationToken cancellationToken = default)
Expand All @@ -916,8 +929,11 @@ public Task<QueryMultipleExtractor> ExecuteQueryMultipleAsync(string commandText
return connection.ExecuteQueryMultipleAsyncInternal(commandText: commandText,
param: param,
commandType: commandType,
cacheKey: cacheKey,
cacheItemExpiration: CacheItemExpiration,
commandTimeout: commandTimeout,
transaction: transaction,
cache: Cache,
isDisposeConnection: isDisposeConnection,
cancellationToken: cancellationToken);
}
Expand Down