using System.Data; using Elsa.Sql.Models; namespace Elsa.Sql.Client; public interface ISqlClient { /// /// Asynchronously executes a Transact-SQL statement against the connection and returns the number of rows affected. /// /// The evaluated query to execute. /// The number of rows affected. public Task ExecuteCommandAsync(EvaluatedQuery evaluatedQuery); /// /// Asynchronously executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored. /// /// The evaluated query to execute. /// The first column of the first row in the result set, or a null reference if the result set is empty. Returns a maximum of 2033 characters. public Task ExecuteScalarAsync(EvaluatedQuery evaluatedQuery); /// /// Asynchronously executes the query, and returns a dataset of data returned by the query. /// /// The evaluated query to execute. /// DataSet of the queried data public Task ExecuteQueryAsync(EvaluatedQuery evaluatedQuery); }