MySqlDbaServices

Provides DBA services for MySql.

Namespace:
Inetdev.Data.MySql.Dba
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
No
Inherits from:
System.Object

Constructors

MySqlDbaServices

Default constructor

Signature:
public Void MySqlDbaServices()

Properties

DataAccessAPI

Database comunication API.

Signature:
public IDbAccess DataAccessAPI { get; set; }

Formatter

Builder to construct database commands.

Signature:
public IDbFormatter Formatter { get; set; }

Methods

ChangeUserPasswordAsync

Changes a user password.

Signature:
public Task ChangeUserPasswordAsync(user)
Parameters
Name Type Summary
user User A User to change it's password.
Exceptions
Type Summary
ArgumentNullException Thrown when user is null.
ValidationException Thrown when the provided input is not valid to run this operation.
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

CreateSchemaAsync

Creates a schema named name.

Signature:
public Task CreateSchemaAsync(name)
Parameters
Name Type Summary
name String Name of the schema to create.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

CreateUserAsync

Creates a user to connect to the database.

Signature:
public Task CreateUserAsync(user)
Parameters
Name Type Summary
user User A User to be created.
Exceptions
Type Summary
ArgumentNullException Thrown when user is null.
ValidationException Thrown when the provided input is not valid to run this operation.
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

DropSchemaAsync

Creates a schema named name.

Signature:
public Task DropSchemaAsync(name)
Parameters
Name Type Summary
name String Name of the schema to create.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

DropUserAsync

Drops a user.

Signature:
public Task DropUserAsync(name)
Parameters
Name Type Summary
name String The name of the user to drop.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when name is null or empty.
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

ExistsUserAsync

Checks if a user named name exists.

Signature:
public Task<Boolean> ExistsUserAsync(name)
Returns

true is the user exists, otherwise false.

Parameters
Name Type Summary
name String Name of the user to check.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

GrantUserAccessToSchemaAsync

Grants the user all access to the specified schema.

Signature:
public Task GrantUserAccessToSchemaAsync(user, schema)
Parameters
Name Type Summary
user String User name to grant access to.
schema String Schema to grant to the user.
Exceptions
Type Summary
ArgumentNullOrEmptyException

Thrown when user is null or empty.

-or- schema is null or empty.

SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.