C# Class MySql.Data.MySqlClient.MySqlConnection

Inheritance: DbConnection, ICloneable
显示文件 Open project: elevate/mysqlconnector-.net Class Usage Examples

Private Properties

Property Type Description
Abort void
ClearCommandTimeout void
CloseFully void
CurrentDatabase string
HandleTimeoutOrThreadAbort void
ICloneable object
OnInfoMessage void
SetCommandTimeout bool
SetState void

Public Methods

Method Description
BeginTransaction ( ) : MySql.Data.MySqlClient.MySqlTransaction
BeginTransaction ( System.Data.IsolationLevel iso ) : MySql.Data.MySqlClient.MySqlTransaction
CancelQuery ( int timeout ) : void
ChangeDatabase ( string databaseName ) : void
ClearAllPools ( ) : void
ClearPool ( MySqlConnection connection ) : void
Clone ( ) : MySqlConnection

Creates a new MySqlConnection object with the exact same ConnectionString value

Close ( ) : void
CreateCommand ( ) : MySqlCommand
EnlistTransaction ( Transaction transaction ) : void

Enlists in the specified transaction.

GetSchema ( ) : DataTable

Returns schema information for the data source of this DbConnection.

GetSchema ( string collectionName ) : DataTable

Returns schema information for the data source of this DbConnection using the specified string for the schema name.

GetSchema ( string collectionName, string restrictionValues ) : DataTable

Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.

MySqlConnection ( ) : System
MySqlConnection ( string connectionString ) : System
Open ( ) : void
Ping ( ) : bool

Ping

Protected Methods

Method Description
BeginDbTransaction ( System.Data.IsolationLevel isolationLevel ) : DbTransaction
CreateDbCommand ( ) : DbCommand
Dispose ( bool disposing ) : void

Private Methods

Method Description
Abort ( ) : void
ClearCommandTimeout ( ) : void

Clears query timeout, allowing next SetCommandTimeout() to succeed.

CloseFully ( ) : void
CurrentDatabase ( ) : string
HandleTimeoutOrThreadAbort ( Exception ex ) : void
ICloneable ( ) : object
OnInfoMessage ( MySqlInfoMessageEventArgs args ) : void
SetCommandTimeout ( int value ) : bool

Sets query timeout. If timeout has been set prior and not yet cleared ClearCommandTimeout(), it has no effect.

SetState ( ConnectionState newConnectionState, bool broadcast ) : void

Method Details

BeginDbTransaction() protected method

protected BeginDbTransaction ( System.Data.IsolationLevel isolationLevel ) : DbTransaction
isolationLevel System.Data.IsolationLevel
return DbTransaction

BeginTransaction() public method

public BeginTransaction ( ) : MySql.Data.MySqlClient.MySqlTransaction
return MySql.Data.MySqlClient.MySqlTransaction

BeginTransaction() public method

public BeginTransaction ( System.Data.IsolationLevel iso ) : MySql.Data.MySqlClient.MySqlTransaction
iso System.Data.IsolationLevel
return MySql.Data.MySqlClient.MySqlTransaction

CancelQuery() public method

public CancelQuery ( int timeout ) : void
timeout int
return void

ChangeDatabase() public method

public ChangeDatabase ( string databaseName ) : void
databaseName string
return void

ClearAllPools() public static method

public static ClearAllPools ( ) : void
return void

ClearPool() public static method

public static ClearPool ( MySqlConnection connection ) : void
connection MySqlConnection
return void

Clone() public method

Creates a new MySqlConnection object with the exact same ConnectionString value
public Clone ( ) : MySqlConnection
return MySqlConnection

Close() public method

public Close ( ) : void
return void

CreateCommand() public method

public CreateCommand ( ) : MySqlCommand
return MySqlCommand

CreateDbCommand() protected method

protected CreateDbCommand ( ) : DbCommand
return DbCommand

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EnlistTransaction() public method

Enlists in the specified transaction.
public EnlistTransaction ( Transaction transaction ) : void
transaction System.Transactions.Transaction /// A reference to an existing in which to enlist. ///
return void

GetSchema() public method

Returns schema information for the data source of this DbConnection.
public GetSchema ( ) : DataTable
return System.Data.DataTable

GetSchema() public method

Returns schema information for the data source of this DbConnection using the specified string for the schema name.
public GetSchema ( string collectionName ) : DataTable
collectionName string Specifies the name of the schema to return.
return System.Data.DataTable

GetSchema() public method

Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.
public GetSchema ( string collectionName, string restrictionValues ) : DataTable
collectionName string Specifies the name of the schema to return.
restrictionValues string Specifies a set of restriction values for the requested schema.
return System.Data.DataTable

MySqlConnection() public method

public MySqlConnection ( ) : System
return System

MySqlConnection() public method

public MySqlConnection ( string connectionString ) : System
connectionString string
return System

Open() public method

public Open ( ) : void
return void

Ping() public method

Ping
public Ping ( ) : bool
return bool