Class MySqlConnectionManager

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

Inheritance
System.Object
DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>
MySqlConnectionManager
Implements
IConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction>
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.Connection
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
System.StringconnectionString

Properties

ConnectionManagerType

The database type for the connection manager.

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

IsMariaDb

Declaration
    public virtual bool IsMariaDb { get; }
Property Value
TypeDescription
System.Boolean

NeedsROWKeyword

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

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
System.String
Overrides
ETLBox.Connection.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
System.String
Overrides
ETLBox.Connection.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; }
Property Value
TypeDescription
System.Boolean
Overrides
ETLBox.Connection.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.Connection.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.BulkDelete(ETLBox.ControlFlow.ITableData)

BulkInsert(ITableData)

Performs a bulk insert

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

Batch of data

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

BulkSelect(ITableData, ICollection<String>, Action, Action, Action<Object>[])

Declaration
    public override void BulkSelect(ITableData data, ICollection<string> selectColumnNames, Action beforeRowReadAction, Action afterRowReadAction, params Action<object>[] rowActions)
Parameters
TypeNameDescription
ITableDatadata
System.Collections.Generic.ICollection<System.String>selectColumnNames
System.ActionbeforeRowReadAction
System.ActionafterRowReadAction
System.Action<System.Object>[]rowActions
Overrides
ETLBox.Connection.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.BulkSelect(ETLBox.ControlFlow.ITableData, System.Collections.Generic.ICollection<System.String>, System.Action, System.Action, System.Action<System.Object>[])

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

System.Collections.Generic.ICollection<System.String>setColumnNames
System.Collections.Generic.ICollection<System.String>joinColumnNames
Overrides
ETLBox.Connection.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.BulkUpdate(ETLBox.ControlFlow.ITableData, System.Collections.Generic.ICollection<System.String>, System.Collections.Generic.ICollection<System.String>)

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
System.Stringtablename
Overrides
ETLBox.Connection.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.CleanUpBulkInsert(System.String)

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.Connection.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
System.Stringtablename
Overrides
ETLBox.Connection.DbConnectionManager<MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlTransaction, MySql.Data.MySqlClient.MySqlParameter>.PrepareBulkInsert(System.String)

Implements

System.IDisposable