Class BaseCommandInterceptor
BaseCommandInterceptor is the base class that should be used for all userland command interceptors
Inheritance
Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data.dll
Version: 9.3.0
Syntax
public abstract class BaseCommandInterceptor
Properties
ActiveConnection
Gets the active connection.
Declaration
protected MySqlConnection ActiveConnection { get; }
Property Value
Type | Description |
---|---|
My |
Methods
ExecuteNonQuery(String, ref Int32)
Executes an SQL statement that returns the number of affected rows.
Declaration
public virtual bool ExecuteNonQuery(string sql, ref int returnValue)
Parameters
Type | Name | Description |
---|---|---|
System. |
sql | The SQL statement to execute. |
System. |
returnValue | The number of affected rows. |
Returns
Type | Description |
---|---|
System. |
|
Remarks
This method is intended to be overriden.
ExecuteReader(String, CommandBehavior, ref MySqlDataReader)
Executes an SQL statement that will return a resultset.
Declaration
public virtual bool ExecuteReader(string sql, CommandBehavior behavior, ref MySqlDataReader returnValue)
Parameters
Type | Name | Description |
---|---|---|
System. |
sql | The SQL statement to execute. |
System. |
behavior | A value that describes the results of the query and its effect on the database. |
My |
returnValue | A My |
Returns
Type | Description |
---|---|
System. |
|
Remarks
This method is intended to be overriden.
ExecuteScalar(String, ref Object)
Executes an SQL statements that returns a scalar value such as a calculation.
Declaration
public virtual bool ExecuteScalar(string sql, ref object returnValue)
Parameters
Type | Name | Description |
---|---|---|
System. |
sql | The SQL statement to execute. |
System. |
returnValue | A scalar value that represents the result returned by the execution of the SQL statement. |
Returns
Type | Description |
---|---|
System. |
|
Remarks
This method is intended to be overriden.
Init(MySqlConnection)
Sets the active connection.
Declaration
public virtual void Init(MySqlConnection connection)
Parameters
Type | Name | Description |
---|---|---|
My |
connection | The active connection. |