Class ConnectionlessProcessor
Inherited Members
Namespace: FluentMigrator.Runner.Processors
Assembly: FluentMigrator.Runner.Core.dll
Syntax
public class ConnectionlessProcessor : IMigrationProcessor, IQuerySchema, IDisposable
  Constructors
| Edit this page View SourceConnectionlessProcessor(IMigrationGenerator, IRunnerContext, IMigrationProcessorOptions)
Declaration
[Obsolete]
public ConnectionlessProcessor(IMigrationGenerator generator, IRunnerContext context, IMigrationProcessorOptions options)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IMigrationGenerator | generator | |
| IRunnerContext | context | |
| IMigrationProcessorOptions | options | 
ConnectionlessProcessor(IGeneratorAccessor, ILogger, IOptionsSnapshot<ProcessorOptions>, IOptions<SelectingProcessorAccessorOptions>)
Declaration
public ConnectionlessProcessor(IGeneratorAccessor generatorAccessor, ILogger logger, IOptionsSnapshot<ProcessorOptions> options, IOptions<SelectingProcessorAccessorOptions> accessorOptions)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGeneratorAccessor | generatorAccessor | |
| ILogger | logger | |
| IOptionsSnapshot<ProcessorOptions> | options | |
| IOptions<SelectingProcessorAccessorOptions> | accessorOptions | 
ConnectionlessProcessor(IGeneratorAccessor, ILogger, IOptionsSnapshot<ProcessorOptions>, IReadOnlyCollection<string>)
Declaration
public ConnectionlessProcessor(IGeneratorAccessor generatorAccessor, ILogger logger, IOptionsSnapshot<ProcessorOptions> options, IReadOnlyCollection<string> processorIds)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGeneratorAccessor | generatorAccessor | |
| ILogger | logger | |
| IOptionsSnapshot<ProcessorOptions> | options | |
| IReadOnlyCollection<string> | processorIds | 
Properties
| Edit this page View SourceAnnouncer
Declaration
[Obsolete]
public IAnnouncer Announcer { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IAnnouncer | 
ConnectionString
Gets the connection string
Declaration
[Obsolete("Will change from public to protected")]
public string ConnectionString { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
DatabaseType
Gets the database type
Declaration
public string DatabaseType { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
DatabaseTypeAliases
Gets the database type aliases
Declaration
public IList<string> DatabaseTypeAliases { get; }
  Property Value
| Type | Description | 
|---|---|
| IList<string> | 
Generator
Declaration
public IMigrationGenerator Generator { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IMigrationGenerator | 
Options
Declaration
public ProcessorOptions Options { get; set; }
  Property Value
| Type | Description | 
|---|---|
| ProcessorOptions | 
Methods
| Edit this page View SourceBeginTransaction()
Begins a transaction
Declaration
public void BeginTransaction()
  ColumnExists(string, string, string)
Tests if a column exists
Declaration
public bool ColumnExists(string schemaName, string tableName, string columnName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
| string | tableName | The table name  | 
      
| string | columnName | The column name  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
CommitTransaction()
Commits a transaction
Declaration
public void CommitTransaction()
  ConstraintExists(string, string, string)
Tests if a constraint exists
Declaration
public bool ConstraintExists(string schemaName, string tableName, string constraintName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
| string | tableName | The table name  | 
      
| string | constraintName | The constraint name  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
DefaultValueExists(string, string, string, object)
Tests if a default value for a column exists
Declaration
public bool DefaultValueExists(string schemaName, string tableName, string columnName, object defaultValue)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
| string | tableName | The table name  | 
      
| string | columnName | The column name  | 
      
| object | defaultValue | The default value  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
  Execute(string)
Execute an SQL statement (escaping not needed)
Declaration
public void Execute(string sql)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | sql | The SQL statement  | 
      
Execute(string, params object[])
Execute an SQL statement
Declaration
public void Execute(string template, params object[] args)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | template | The SQL statement  | 
      
| object[] | args | The arguments to replace in the SQL statement  | 
      
Exists(string, params object[])
Returns true if data could be found for the given SQL query
Declaration
public bool Exists(string template, params object[] args)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | template | The SQL query  | 
      
| object[] | args | The arguments of the SQL query  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
IndexExists(string, string, string)
Tests if an index exists
Declaration
public bool IndexExists(string schemaName, string tableName, string indexName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
| string | tableName | The table name  | 
      
| string | indexName | The index name  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
Process(AlterColumnExpression)
Executes a ALTER TABLE ALTER COLUMN SQL expression
Declaration
public void Process(AlterColumnExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AlterColumnExpression | expression | The expression to execute  | 
      
Process(AlterDefaultConstraintExpression)
Executes an SQL expression to alter a default constraint
Declaration
public void Process(AlterDefaultConstraintExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AlterDefaultConstraintExpression | expression | The expression to execute  | 
      
Process(AlterSchemaExpression)
Executes a ALTER SCHEMA SQL expression
Declaration
public void Process(AlterSchemaExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AlterSchemaExpression | expression | The expression to execute  | 
      
Process(AlterTableExpression)
Executes a ALTER TABLE SQL expression
Declaration
public void Process(AlterTableExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AlterTableExpression | expression | The expression to execute  | 
      
Process(CreateColumnExpression)
Executes a ALTER TABLE ADD COLUMN SQL expression
Declaration
public void Process(CreateColumnExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateColumnExpression | expression | The expression to execute  | 
      
Process(CreateConstraintExpression)
Executes an SQL expression to create a constraint
Declaration
public void Process(CreateConstraintExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateConstraintExpression | expression | The expression to execute  | 
      
Process(CreateForeignKeyExpression)
Executes an SQL expression to create a foreign key
Declaration
public void Process(CreateForeignKeyExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateForeignKeyExpression | expression | The expression to execute  | 
      
Process(CreateIndexExpression)
Executes an SQL expression to create an index
Declaration
public void Process(CreateIndexExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateIndexExpression | expression | The expression to execute  | 
      
Process(CreateSchemaExpression)
Executes a CREATE SCHEMA SQL expression
Declaration
public void Process(CreateSchemaExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateSchemaExpression | expression | The expression to execute  | 
      
Process(CreateSequenceExpression)
Executes a CREATE SEQUENCE SQL expression
Declaration
public void Process(CreateSequenceExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateSequenceExpression | expression | The expression to execute  | 
      
Process(CreateTableExpression)
Executes a CREATE TABLE SQL expression
Declaration
public void Process(CreateTableExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateTableExpression | expression | The expression to execute  | 
      
Process(DeleteColumnExpression)
Executes a ALTER TABLE DROP COLUMN SQL expression
Declaration
public void Process(DeleteColumnExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteColumnExpression | expression | The expression to execute  | 
      
Process(DeleteConstraintExpression)
Executes an SQL expression to drop a constraint
Declaration
public void Process(DeleteConstraintExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteConstraintExpression | expression | The expression to execute  | 
      
Process(DeleteDataExpression)
Executes an SQL expression to DELETE data
Declaration
public void Process(DeleteDataExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteDataExpression | expression | The expression to execute  | 
      
Process(DeleteDefaultConstraintExpression)
Executes an SQL expression to drop a default constraint
Declaration
public void Process(DeleteDefaultConstraintExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteDefaultConstraintExpression | expression | The expression to execute  | 
      
Process(DeleteForeignKeyExpression)
Executes an SQL expression to drop a foreign key
Declaration
public void Process(DeleteForeignKeyExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteForeignKeyExpression | expression | The expression to execute  | 
      
Process(DeleteIndexExpression)
Executes an SQL expression to drop an index
Declaration
public void Process(DeleteIndexExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteIndexExpression | expression | The expression to execute  | 
      
Process(DeleteSchemaExpression)
Executes a DROP SCHEMA SQL expression
Declaration
public void Process(DeleteSchemaExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteSchemaExpression | expression | The expression to execute  | 
      
Process(DeleteSequenceExpression)
Executes a DROP SEQUENCE SQL expression
Declaration
public void Process(DeleteSequenceExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteSequenceExpression | expression | The expression to execute  | 
      
Process(DeleteTableExpression)
Executes a DROP TABLE SQL expression
Declaration
public void Process(DeleteTableExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DeleteTableExpression | expression | The expression to execute  | 
      
Process(InsertDataExpression)
Executes an SQL expression to INSERT data
Declaration
public void Process(InsertDataExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| InsertDataExpression | expression | The expression to execute  | 
      
Process(PerformDBOperationExpression)
Executes a DB operation
Declaration
public void Process(PerformDBOperationExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PerformDBOperationExpression | expression | The expression to execute  | 
      
Process(RenameColumnExpression)
Executes an SQL expression to rename a column
Declaration
public void Process(RenameColumnExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RenameColumnExpression | expression | The expression to execute  | 
      
Process(RenameTableExpression)
Executes an SQL expression to rename a table
Declaration
public void Process(RenameTableExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RenameTableExpression | expression | The expression to execute  | 
      
Process(UpdateDataExpression)
Executes an SQL expression to UPDATE data
Declaration
public void Process(UpdateDataExpression expression)
  Parameters
| Type | Name | Description | 
|---|---|---|
| UpdateDataExpression | expression | The expression to execute  | 
      
Process(string)
Declaration
protected void Process(string sql)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | sql | 
Read(string, params object[])
Executes and returns the result of an SQL query
Declaration
public DataSet Read(string template, params object[] args)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | template | The SQL query  | 
      
| object[] | args | The arguments of the SQL query  | 
      
Returns
| Type | Description | 
|---|---|
| DataSet | The data from the specified SQL query  | 
      
ReadTableData(string, string)
Reads all data from all rows from a table
Declaration
public DataSet ReadTableData(string schemaName, string tableName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name of the table  | 
      
| string | tableName | The table name  | 
      
Returns
| Type | Description | 
|---|---|
| DataSet | The data from the specified table  | 
      
RollbackTransaction()
Rollback of a transaction
Declaration
public void RollbackTransaction()
  SchemaExists(string)
Tests if the schema exists
Declaration
public bool SchemaExists(string schemaName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
SequenceExists(string, string)
Tests if a sequence exists
Declaration
public bool SequenceExists(string schemaName, string sequenceName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
| string | sequenceName | The sequence name  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
TableExists(string, string)
Tests if the table exists
Declaration
public bool TableExists(string schemaName, string tableName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | schemaName | The schema name  | 
      
| string | tableName | The table name  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  |