MySqlConnectionManager

Class MySqlConnectionManager

Connection manager of a ETLBox connection to a MySql Server. Uses the official MySql ADO.NET driver for .NET.

Inheritance
DbConnectionManager<MySqlConnection, MySqlTransaction, MySqlParameter>
MySqlConnectionManager
Implements
IConnectionManager<MySqlConnection, MySqlTransaction>
Inherited Members
Namespace: ETLBox.MySql
Assembly: ETLBox.MySql.dll
Syntax
    public class MySqlConnectionManager : DbConnectionManager<MySqlConnection, MySqlTransaction, MySqlParameter>, IConnectionManager<MySqlConnection, MySqlTransaction>, IConnectionManager, IDisposable
Examples
var mySqlConnection = new MySqlConnectionManager("Data Source=.;");

Constructors

MySqlConnectionManager()

Declaration
    public MySqlConnectionManager()

MySqlConnectionManager(MySqlConnectionString)

Declaration
    public MySqlConnectionManager(MySqlConnectionString connectionString)
Parameters
TypeNameDescription
MySqlConnectionStringconnectionString

MySqlConnectionManager(string)

Declaration
    public MySqlConnectionManager(string connectionString)
Parameters
TypeNameDescription
stringconnectionString

Properties

ConnectionType

The database type for the connection manager.

Declaration
    public override ConnectionType ConnectionType { get; protected set; }
Property Value
TypeDescription
ConnectionType
Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.ConnectionType

MaxParameterSizeBulkCopy

Returns the maximum amount of parameters that can be used for bulk inserts.

Declaration
    public override int MaxParameterSizeBulkCopy { get; set; }
Property Value
TypeDescription
int
Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.MaxParameterSizeBulkCopy

MaxParameterSizeSql

Returns the maximum amount of parameters that can be passed into a sql query.

Declaration
    public override int MaxParameterSizeSql { get; set; }
Property Value
TypeDescription
int
Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.MaxParameterSizeSql

NeedsROWKeyword

Declaration
    public virtual bool NeedsROWKeyword { get; }
Property Value
TypeDescription
bool

QB

The quotation begin character that is used in the database. E.g. SqlServer uses: '[' and Postgres: '"'

Declaration
    public override string QB { get; protected set; }
Property Value
TypeDescription
string
Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.QB

QE

The quotation end character that is used in the database. E.g. SqlServer uses: ']' and Postgres: '"'

Declaration
    public override string QE { get; protected set; }
Property Value
TypeDescription
string
Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.QE

SupportSchemas

Indicates if the database supports schemas In MySql, this is false because the schema here is a database in ETLBox. Use SupportDatabases instead

Declaration
    public override bool SupportSchemas { get; protected set; }
Property Value
TypeDescription
bool
Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.SupportSchemas

Methods

BulkDelete(ITableData)

Performs a bulk delete

Declaration
    public override void BulkDelete(ITableData data)
Parameters
TypeNameDescription
ITableDatadata

Batch of data

Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.BulkDelete(ETLBox.ITableData)

BulkInsert(ITableData)

Performs a bulk insert

Declaration
    public override void BulkInsert(ITableData data)
Parameters
TypeNameDescription
ITableDatadata

Batch of data

Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.BulkInsert(ETLBox.ITableData)

BulkSelect(ITableData, ICollection<string>, Action, Action, params Action<object>[])

Performs a bulk select

Declaration
    public override void BulkSelect(ITableData data, ICollection<string> selectColumnNames, Action beforeRowReadAction, Action afterRowReadAction, params Action<object>[] rowActions)
Parameters
TypeNameDescription
ITableDatadata

Batch of data needed for the where condition

ICollection<string>selectColumnNames

Column names included in the select

ActionbeforeRowReadAction

Action invoked before any data is read

ActionafterRowReadAction

Action invoked after all data is read

Action<object>[]rowActions
Overrides

BulkUpdate(ITableData, ICollection<string>, ICollection<string>)

Performs a bulk update

Declaration
    public override void BulkUpdate(ITableData data, ICollection<string> setColumnNames, ICollection<string> joinColumnNames)
Parameters
TypeNameDescription
ITableDatadata

Batch of data

ICollection<string>setColumnNames

The column names used in the set part of the update statement

ICollection<string>joinColumnNames

The column names to join for the update

Overrides

CleanUpBulkInsert(string)

Called after the whole bulk insert operation to change back settings made to improve bulk insert performance

Declaration
    public override void CleanUpBulkInsert(string tablename)
Parameters
TypeNameDescription
stringtablename
Overrides

Clone()

Cretes a clone of the current connection manager

Declaration
    public override IConnectionManager Clone()
Returns
TypeDescription
IConnectionManager

A instance copy of the current connection manager

Overrides
ETLBox.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.Clone()

PrepareBulkInsert(string)

Performs preparations needed to improved performance of a bulk insert operation

Declaration
    public override void PrepareBulkInsert(string tablename)
Parameters
TypeNameDescription
stringtablename
Overrides

Implements