Skip to content

IExecutionContext Interface ​

Definition ​

Interface representing a command execution methods for a database session

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Properties ​

NameDescription
TransactionCountGets the count of over-the-wire transactions executed for the Session's connection object

Methods ​

NameDescription
NonQueryResult ExecuteNonQuery(string command, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null)Execute a Non-Query operation on the database connection returning TRUE for success
Task<NonQueryResult> ExecuteNonQueryAsync(string command, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null, CancellationToken cancellationToken = null)Asynchronously execute a Non-Query operation on the database connection returning TRUE for success
Reader ExecuteReader(string command, IReadOnlyList<IParameter> parameters = null, bool doFirstRead = null, bool allowBatch = null, CommandType commandType = null, bool enableReaderTracking = null, int commandTimeout = null)Executes a database query and returns a Reader to read the results.
Task<Reader> ExecuteReaderAsync(ISqlStatement statement, bool doFirstRead = null, bool allowBatch = null, CommandType commandType = null, bool enableReaderTracking = null, int commandTimeout = null, CancellationToken cancellationToken = null)Executes a database query asynchronously and returns a Reader to read the results.
Task<Reader> ExecuteReaderAsync(string command, IReadOnlyList<IParameter> parameters = null, bool doFirstRead = null, bool allowBatch = null, CommandType commandType = null, bool enableReaderTracking = null, int commandTimeout = null, CancellationToken cancellationToken = null)Executes a database query asynchronously and returns a Reader to read the results.
T ExecuteScalar(string command, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null)Execute command against the existing connection and return Scalar object
T ExecuteScalar(string command, out TimeSpan timings, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null)Execute command against the existing connection and return Scalar object
object ExecuteScalar(string command, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null)Execute command against the existing connection and return Scalar object
object ExecuteScalar(string command, out TimeSpan timings, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null)Execute command against the existing connection and return Scalar object
Task<T> ExecuteScalarAsync(ISqlStatement statement, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null, CancellationToken cancellationToken = null)Asynchronously execute command against the existing connection and return Scalar object
Task<T> ExecuteScalarAsync(string command, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null, CancellationToken cancellationToken = null)Asynchronously execute command against the existing connection and return Scalar object
Task<object> ExecuteScalarAsync(ISqlStatement statement, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null, CancellationToken cancellationToken = null)Asynchronously execute command against the existing connection and return Scalar object
Task<object> ExecuteScalarAsync(string command, IReadOnlyList<IParameter> parameters = null, bool allowBatch = null, CommandType commandType = null, int commandTimeout = null, CancellationToken cancellationToken = null)Asynchronously execute command against the existing connection and return Scalar object
Task<QueryPlanResult> ExplainAsync(ISqlStatement statement, QueryPlanOptions options = null, CancellationToken cancellationToken = null)Requests an explain / showplan for the specified statement and returns a normalized result.
Task<QueryPlanResult> ExplainAsync(string command, IReadOnlyList<IParameter> parameters = null, QueryPlanOptions options = null, CancellationToken cancellationToken = null)Requests an explain / showplan for the specified SQL text and returns a normalized result.