Struct SqlDatabaseFactoryStatementExecutor
Represents an executor of SQL statements ran by ISqlDatabaseFactory instances. Objects of this type invoke all ISqlDatabaseFactoryStatementListener instances specified in SqlCreateDatabaseOptions.
public struct SqlDatabaseFactoryStatementExecutor
- Inherited Members
Properties
CommandTimeout
Optional explicit CommandTimeout.
public readonly TimeSpan? CommandTimeout { get; }
Property Value
Methods
Execute(DbCommand, SqlDatabaseFactoryStatementKey, SqlDatabaseFactoryStatementType, SqlDatabaseBuilderCommandAction)
Executes provided DbCommand synchronously.
public void Execute(DbCommand command, SqlDatabaseFactoryStatementKey key, SqlDatabaseFactoryStatementType type, SqlDatabaseBuilderCommandAction action)
Parameters
commandDbCommandCommand to execute.
keySqlDatabaseFactoryStatementKeySqlDatabaseFactoryStatementKey instance that identifies this SQL statement.
typeSqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement.
actionSqlDatabaseBuilderCommandActionSqlDatabaseBuilderCommandAction instance that contains this SQL statement's definition.
ExecuteForVersionHistory(DbCommand, SqlDatabaseBuilderCommandAction, SqlDatabaseFactoryStatementType)
Executes provided DbCommand synchronously.
public void ExecuteForVersionHistory(DbCommand command, SqlDatabaseBuilderCommandAction action, SqlDatabaseFactoryStatementType type = SqlDatabaseFactoryStatementType.VersionHistory)
Parameters
commandDbCommandCommand to execute.
actionSqlDatabaseBuilderCommandActionSqlDatabaseBuilderCommandAction instance that contains this SQL statement's definition.
typeSqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement. Equal to VersionHistory by default.
ExecuteForVersionHistory<T>(DbCommand, Func<DbCommand, T>, SqlDatabaseFactoryStatementType)
Executes provided DbCommand synchronously.
public T ExecuteForVersionHistory<T>(DbCommand command, Func<DbCommand, T> invoker, SqlDatabaseFactoryStatementType type = SqlDatabaseFactoryStatementType.VersionHistory)
Parameters
commandDbCommandCommand to execute.
invokerFunc<DbCommand, T>Delegate that invokes the provided
commandand returns the result.typeSqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement. Equal to VersionHistory by default.
Returns
- T
Result of the invocation.
Type Parameters
TResult type.
Execute<T>(DbCommand, SqlDatabaseFactoryStatementKey, SqlDatabaseFactoryStatementType, Func<DbCommand, T>)
Executes provided DbCommand synchronously.
public T Execute<T>(DbCommand command, SqlDatabaseFactoryStatementKey key, SqlDatabaseFactoryStatementType type, Func<DbCommand, T> invoker)
Parameters
commandDbCommandCommand to execute.
keySqlDatabaseFactoryStatementKeySqlDatabaseFactoryStatementKey instance that identifies this SQL statement.
typeSqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement.
invokerFunc<DbCommand, T>Delegate that invokes the provided
commandand returns the result.
Returns
- T
Result of the invocation.
Type Parameters
TResult type.