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
command
DbCommandCommand to execute.
key
SqlDatabaseFactoryStatementKeySqlDatabaseFactoryStatementKey instance that identifies this SQL statement.
type
SqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement.
action
SqlDatabaseBuilderCommandActionSqlDatabaseBuilderCommandAction 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
command
DbCommandCommand to execute.
action
SqlDatabaseBuilderCommandActionSqlDatabaseBuilderCommandAction instance that contains this SQL statement's definition.
type
SqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType 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
command
DbCommandCommand to execute.
invoker
Func<DbCommand, T>Delegate that invokes the provided
command
and returns the result.type
SqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement. Equal to VersionHistory by default.
Returns
- T
Result of the invocation.
Type Parameters
T
Result 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
command
DbCommandCommand to execute.
key
SqlDatabaseFactoryStatementKeySqlDatabaseFactoryStatementKey instance that identifies this SQL statement.
type
SqlDatabaseFactoryStatementTypeSqlDatabaseFactoryStatementType instance that specifies the type of this SQL statement.
invoker
Func<DbCommand, T>Delegate that invokes the provided
command
and returns the result.
Returns
- T
Result of the invocation.
Type Parameters
T
Result type.