DropDatabaseTask

Class DropDatabaseTask

Drops a database. Use DropIfExists to drop a database only if it exists. In MySql, this will drop a schema.

Implements
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
    public sealed class DropDatabaseTask : DropTask<IfDatabaseExistsTask>, ILoggableTask
Examples
DropDatabaseTask.Delete("DemoDB");

Constructors

DropDatabaseTask()

Declaration
    public DropDatabaseTask()

DropDatabaseTask(string)

Declaration
    public DropDatabaseTask(string databaseName)
Parameters
TypeNameDescription
stringdatabaseName

Methods

Drop(IConnectionManager, string)

Drops a database. In MySql, this will drop a schema.

Declaration
    public static void Drop(IConnectionManager connectionManager, string databaseName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

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)

stringdatabaseName

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
TypeNameDescription
stringdatabaseName

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
TypeNameDescription
IConnectionManagerconnectionManager

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)

stringdatabaseName

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
TypeNameDescription
stringdatabaseName

Name of the database (MySql: schema) to drop

Implements