DropDatabaseTask
Class DropDatabaseTask
Drops a database. Use DropIfExists to drop a database only if it exists. In MySql, this will drop a schema.
Implements
Inherited Members
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
public sealed class DropDatabaseTask : DropTask<IfDatabaseExistsTask>, ILoggableTaskExamples
DropDatabaseTask.Delete("DemoDB");Constructors
DropDatabaseTask()
Declaration
public DropDatabaseTask()DropDatabaseTask(string)
Declaration
public DropDatabaseTask(string databaseName)Parameters
| Type | Name | Description |
|---|---|---|
| string | databaseName |
Methods
Drop(IConnectionManager, string)
Drops a database. In MySql, this will drop a schema.
Declaration
public static void Drop(IConnectionManager connectionManager, string databaseName)Parameters
| Type | Name | Description |
|---|---|---|
| IConnectionManager | connectionManager | The connection manager of the server you want to connect. Make sure this points to a database that does exist (e.g. a system database) |
| string | databaseName | Name of the database (MySql: schema) to drop |
Drop(string)
Drops a database. In MySql, this will drop a schema. Make sure that your default connection string points to the server itself and to an existing database (e.g. a system database).
Declaration
public static void Drop(string databaseName)Parameters
| Type | Name | Description |
|---|---|---|
| string | databaseName | Name of the database (MySql: schema) to drop |
DropIfExists(IConnectionManager, string)
Drops a database if the database exists. In MySql, this will drop a schema.
Declaration
public static void DropIfExists(IConnectionManager connectionManager, string databaseName)Parameters
| Type | Name | Description |
|---|---|---|
| IConnectionManager | connectionManager | The connection manager of the server you want to connect. Make sure this points to a database that does exist (e.g. a system database) |
| string | databaseName | Name of the database (MySql: schema) to drop |
DropIfExists(string)
Drops a database if the database exists. In MySql, this will drop a schema.
Declaration
public static void DropIfExists(string databaseName)Parameters
| Type | Name | Description |
|---|---|---|
| string | databaseName | Name of the database (MySql: schema) to drop |