C# Class ALFA.MySQLDatabaseInternal

This wrapper class shields callers of MySQLDatabase from needing to immediately demand that the MySql.Data.dll assembly be loaded.
Inheritance: IDisposable
Afficher le fichier Open project: ALandFarAway/ALFA-Base-Resources Class Usage Examples

Méthodes publiques

Méthode Description
ACR_SQLEncodeSpecialChars ( string s ) : string

This routine escapes characters for a SQL query.

ACR_SQLExecute ( string SQL ) : void

This routine performs a synchronous SQL query. If there were pending asynchronous queries in the queue, the pending queries are drained first. The query must not return any results.

ACR_SQLFetch ( ) : bool

This routine fetches the next rowset from the database.

ACR_SQLGetAffectedRows ( ) : int

This routine returns the number of rows affected by a query.

ACR_SQLGetData ( ) : string

This routine returns the first column of data from the current SQL rowset.

ACR_SQLGetData ( int ColumnIndex ) : string

This routine returns the specified column of data from the current SQL rowset.

ACR_SQLQuery ( string SQL ) : void

This routine performs a synchronous SQL query. If there were pending asynchronous queries in the queue, the pending queries are drained first.

Dispose ( ) : void

Dispose the object.

Private Methods

Méthode Description
ACR_SQLNextResult ( ) : bool

This routine advances to the next result set of a multi-result query.

ConnectDatabase ( ) : void

Connect a dedicated connection to the database.

Dispose ( bool Disposing ) : void

Dispose the object.

MySQLDatabaseInternal ( string ConnectionString = null, bool Dedicated = false ) : System

Create a new MySQLDatabaseInternal object.

PrepareSQL ( string SQL ) : string

Prepare a query string for execution. Currently, this prepends a USE DatabaseName; statement to improve latency (see discussion below with DatabaseName).

SetupConnectionString ( ) : void

This method sets up the database connection string based on the default connection information set for the MySQL plugin. The pool size of 3 is based on : - One connection for polling for input by the GameWorldManager synchronization thread. - One connection for background ad-hoc queries kicked off by the server communicator on work items (account record lookup, etc.). - One connection for miscellaneous use.

Method Details

ACR_SQLEncodeSpecialChars() public méthode

This routine escapes characters for a SQL query.
public ACR_SQLEncodeSpecialChars ( string s ) : string
s string Supplies the string to escape.
Résultat string

ACR_SQLExecute() public méthode

This routine performs a synchronous SQL query. If there were pending asynchronous queries in the queue, the pending queries are drained first. The query must not return any results.
public ACR_SQLExecute ( string SQL ) : void
SQL string Supplies the SQL query text to execute.
Résultat void

ACR_SQLFetch() public méthode

This routine fetches the next rowset from the database.
public ACR_SQLFetch ( ) : bool
Résultat bool

ACR_SQLGetAffectedRows() public méthode

This routine returns the number of rows affected by a query.
public ACR_SQLGetAffectedRows ( ) : int
Résultat int

ACR_SQLGetData() public méthode

This routine returns the first column of data from the current SQL rowset.
public ACR_SQLGetData ( ) : string
Résultat string

ACR_SQLGetData() public méthode

This routine returns the specified column of data from the current SQL rowset.
public ACR_SQLGetData ( int ColumnIndex ) : string
ColumnIndex int Supplies the zero-based column index to /// retrieve.
Résultat string

ACR_SQLQuery() public méthode

This routine performs a synchronous SQL query. If there were pending asynchronous queries in the queue, the pending queries are drained first.
public ACR_SQLQuery ( string SQL ) : void
SQL string Supplies the SQL query text to execute.
Résultat void

Dispose() public méthode

Dispose the object.
public Dispose ( ) : void
Résultat void