Class MySqlConnection
Inheritance
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbConnection
MySqlConnection
Implements
System.ComponentModel.IComponent
System.Data.IDbConnection
System.IDisposable
Inherited Members
System.Data.Common.DbConnection.OnStateChange(System.Data.StateChangeEventArgs)
System.Data.Common.DbConnection.OpenAsync()
System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction(System.Data.IsolationLevel)
System.Data.Common.DbConnection.System.Data.IDbConnection.CreateCommand()
System.Data.Common.DbConnection.StateChange
System.ComponentModel.Component.Dispose()
System.ComponentModel.Component.GetService(System.Type)
System.ComponentModel.Component.ToString()
System.ComponentModel.Component.CanRaiseEvents
System.ComponentModel.Component.Container
System.ComponentModel.Component.DesignMode
System.ComponentModel.Component.Events
System.ComponentModel.Component.Site
System.ComponentModel.Component.Disposed
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
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)
Namespace: MySql.Data.MySqlClient
Assembly: Azos.MySql.dll
Syntax
public sealed class MySqlConnection : DbConnection, IComponent, IDbConnection, IDisposable
Constructors
MySqlConnection()
Declaration
public MySqlConnection()
MySqlConnection(String)
Declaration
public MySqlConnection(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString |
Properties
ConnectionString
Declaration
public override string ConnectionString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
System.Data.Common.DbConnection.ConnectionString
ConnectionTimeout
Declaration
public override int ConnectionTimeout { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
System.Data.Common.DbConnection.ConnectionTimeout
Database
Declaration
public override string Database { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
System.Data.Common.DbConnection.Database
DataSource
Declaration
public override string DataSource { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
System.Data.Common.DbConnection.DataSource
DbProviderFactory
Declaration
protected override DbProviderFactory DbProviderFactory { get; }
Property Value
Type | Description |
---|---|
System.Data.Common.DbProviderFactory |
Overrides
System.Data.Common.DbConnection.DbProviderFactory
ServerThread
Declaration
public int ServerThread { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ServerVersion
Declaration
public override string ServerVersion { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
System.Data.Common.DbConnection.ServerVersion
State
Declaration
public override ConnectionState State { get; }
Property Value
Type | Description |
---|---|
System.Data.ConnectionState |
Overrides
System.Data.Common.DbConnection.State
Methods
BeginDbTransaction(IsolationLevel)
Declaration
protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IsolationLevel | isolationLevel |
Returns
Type | Description |
---|---|
System.Data.Common.DbTransaction |
Overrides
System.Data.Common.DbConnection.BeginDbTransaction(System.Data.IsolationLevel)
BeginTransaction()
Declaration
public MySqlTransaction BeginTransaction()
Returns
Type | Description |
---|---|
MySqlTransaction |
BeginTransaction(IsolationLevel)
Declaration
public MySqlTransaction BeginTransaction(IsolationLevel isolationLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IsolationLevel | isolationLevel |
Returns
Type | Description |
---|---|
MySqlTransaction |
BeginTransactionAsync(IsolationLevel, CancellationToken)
Declaration
public Task<MySqlTransaction> BeginTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Data.IsolationLevel | isolationLevel | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MySqlTransaction> |
BeginTransactionAsync(CancellationToken)
Declaration
public Task<MySqlTransaction> BeginTransactionAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MySqlTransaction> |
ChangeDatabase(String)
Declaration
public override void ChangeDatabase(string databaseName)
Parameters
Type | Name | Description |
---|---|---|
System.String | databaseName |
Overrides
System.Data.Common.DbConnection.ChangeDatabase(System.String)
ChangeDatabaseAsync(String)
Declaration
public Task ChangeDatabaseAsync(string databaseName)
Parameters
Type | Name | Description |
---|---|---|
System.String | databaseName |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ChangeDatabaseAsync(String, CancellationToken)
Declaration
public Task ChangeDatabaseAsync(string databaseName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | databaseName | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearAllPools()
Declaration
public static void ClearAllPools()
ClearAllPoolsAsync()
Declaration
public static Task ClearAllPoolsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearAllPoolsAsync(CancellationToken)
Declaration
public static Task ClearAllPoolsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearPool(MySqlConnection)
Declaration
public static void ClearPool(MySqlConnection connection)
Parameters
Type | Name | Description |
---|---|---|
MySqlConnection | connection |
ClearPoolAsync(MySqlConnection)
Declaration
public static Task ClearPoolAsync(MySqlConnection connection)
Parameters
Type | Name | Description |
---|---|---|
MySqlConnection | connection |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearPoolAsync(MySqlConnection, CancellationToken)
Declaration
public static Task ClearPoolAsync(MySqlConnection connection, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
MySqlConnection | connection | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Close()
Declaration
public override void Close()
Overrides
System.Data.Common.DbConnection.Close()
CreateCommand()
Declaration
public MySqlCommand CreateCommand()
Returns
Type | Description |
---|---|
MySqlCommand |
CreateDbCommand()
Declaration
protected override DbCommand CreateDbCommand()
Returns
Type | Description |
---|---|
System.Data.Common.DbCommand |
Overrides
System.Data.Common.DbConnection.CreateDbCommand()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
System.ComponentModel.Component.Dispose(System.Boolean)
EnlistTransaction(Transaction)
Declaration
public override void EnlistTransaction(Transaction transaction)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.Transaction | transaction |
Overrides
System.Data.Common.DbConnection.EnlistTransaction(System.Transactions.Transaction)
GetSchema()
Declaration
public override DataTable GetSchema()
Returns
Type | Description |
---|---|
System.Data.DataTable |
Overrides
System.Data.Common.DbConnection.GetSchema()
GetSchema(String)
Declaration
public override DataTable GetSchema(string collectionName)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName |
Returns
Type | Description |
---|---|
System.Data.DataTable |
Overrides
System.Data.Common.DbConnection.GetSchema(System.String)
GetSchema(String, String[])
Declaration
public override DataTable GetSchema(string collectionName, string[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | |
System.String[] | restrictions |
Returns
Type | Description |
---|---|
System.Data.DataTable |
Overrides
System.Data.Common.DbConnection.GetSchema(System.String, System.String[])
Open()
Declaration
public override void Open()
Overrides
System.Data.Common.DbConnection.Open()
OpenAsync(CancellationToken)
Declaration
public override Task OpenAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
System.Data.Common.DbConnection.OpenAsync(System.Threading.CancellationToken)
Implements
System.ComponentModel.IComponent
System.Data.IDbConnection
System.IDisposable