Interface IExecuteExpressionRoot
Executes some SQL
Namespace: FluentMigrator.Builders.Execute
Assembly: FluentMigrator.Abstractions.dll
Syntax
public interface IExecuteExpressionRoot
Methods
| Edit this page View SourceEmbeddedScript(string)
Executes an SQL script loaded from an embedded resource
Declaration
void EmbeddedScript(string embeddedSqlScriptName)
Parameters
Type | Name | Description |
---|---|---|
string | embeddedSqlScriptName | The name of the embedded SQL script (partial matches allowed) |
EmbeddedScript(string, IDictionary<string, string>)
Executes an SQL script loaded from an embedded resource
Declaration
void EmbeddedScript(string embeddedSqlScriptName, IDictionary<string, string> parameters)
Parameters
Type | Name | Description |
---|---|---|
string | embeddedSqlScriptName | The name of the embedded SQL script (partial matches allowed) |
IDictionary<string, string> | parameters | The parameters to be replaced in the SQL script |
Script(string)
Executes an SQL script loaded from the given file
Declaration
void Script(string pathToSqlScript)
Parameters
Type | Name | Description |
---|---|---|
string | pathToSqlScript | The file to read the SQL script from |
Script(string, IDictionary<string, string>)
Executes an SQL script loaded from the given file
Declaration
void Script(string pathToSqlScript, IDictionary<string, string> parameters)
Parameters
Type | Name | Description |
---|---|---|
string | pathToSqlScript | The file to read the SQL script from |
IDictionary<string, string> | parameters | The parameters to be replaced in the SQL script |
Sql(string)
Executes an SQL statement
Declaration
void Sql(string sqlStatement)
Parameters
Type | Name | Description |
---|---|---|
string | sqlStatement | The SQL statement to execute |
Sql(string, string)
Executes an SQL statement
Declaration
void Sql(string sqlStatement, string description)
Parameters
Type | Name | Description |
---|---|---|
string | sqlStatement | The SQL statement to execute |
string | description | Description for this SQL statement for logging purposes |
WithConnection(Action<IDbConnection, IDbTransaction>)
Calls an action to execute dynamically generated SQL statements
Declaration
void WithConnection(Action<IDbConnection, IDbTransaction> operation)
Parameters
Type | Name | Description |
---|---|---|
Action<IDbConnection, IDbTransaction> | operation | The operation to execute on a given connection and transaction |