|
| virtual bool | Close ()=0 |
| | Disconnects the database and frees its associated memory. Note that the actual object will not be freed until all open references have been closed. More...
|
| |
| virtual const char * | GetError (int *errorCode=NULL)=0 |
| | Error code and string returned by the last operation on this connection. More...
|
| |
| virtual bool | DoSimpleQuery (const char *query)=0 |
| | Prepares and executes a query in one step, and discards any return data. More...
|
| |
| virtual IQuery * | DoQuery (const char *query)=0 |
| | Prepares and executes a query in one step, and returns the resultant data set. More...
|
| |
| virtual IPreparedQuery * | PrepareQuery (const char *query, char *error, size_t maxlength, int *errCode=NULL)=0 |
| | Prepares a query statement for multiple executions and/or binding marked parameters (? in MySQL/sqLite, $n in PostgreSQL). More...
|
| |
| virtual bool | QuoteString (const char *str, char buffer[], size_t maxlen, size_t *newSize)=0 |
| |
| virtual unsigned int | GetAffectedRows ()=0 |
| | Number of rows affected by the last execute. More...
|
| |
| virtual unsigned int | GetInsertID ()=0 |
| | Retrieves the last insert ID on this database connection. More...
|
| |
| virtual bool | LockForFullAtomicOperation ()=0 |
| | Locks the database for an atomic query+retrieval operation. More...
|
| |
|
virtual void | UnlockFromFullAtomicOperation ()=0 |
| | Unlocks a locked atomic fetch.
|
| |
| virtual void | IncReferenceCount ()=0 |
| | Increases the reference count on the database. More...
|
| |
| virtual IDBDriver * | GetDriver ()=0 |
| | Returns the parent driver. More...
|
| |
| virtual bool | DoSimpleQueryEx (const char *query, size_t len)=0 |
| | Prepares and executes a binary query in one step, and discards any return data. More...
|
| |
| virtual IQuery * | DoQueryEx (const char *query, size_t len)=0 |
| | Prepares and executes a binary query in one step, and returns the resultant data set. More...
|
| |
| virtual unsigned int | GetAffectedRowsForQuery (IQuery *query)=0 |
| | Retrieves the number of affected rows from the last execute of the given query. More...
|
| |
| virtual unsigned int | GetInsertIDForQuery (IQuery *query)=0 |
| | Retrieves the last insert id of the given query. More...
|
| |
| virtual bool | SetCharacterSet (const char *characterset)=0 |
| | Sets the character set of the current connection. More...
|
| |
|
void | AddRef () |
| | Wrapper around IncReferenceCount(), for ke::Ref.
|
| |
|
void | Release () |
| | Wrapper around Close(), for ke::Ref.
|
| |
Encapsulates a database connection.
| virtual IQuery* SourceMod::IDatabase::DoQuery |
( |
const char * |
query | ) |
|
|
pure virtual |
Prepares and executes a query in one step, and returns the resultant data set.
Note: If a query contains more than one result set, each result set must be processed before a new query is started.
This function is not thread safe and must be included in any locks.
- Parameters
-
- Returns
- IQuery pointer on success, NULL otherwise.
| virtual IQuery* SourceMod::IDatabase::DoQueryEx |
( |
const char * |
query, |
|
|
size_t |
len |
|
) |
| |
|
pure virtual |
Prepares and executes a binary query in one step, and returns the resultant data set.
Note: If a query contains more than one result set, each result set must be processed before a new query is started.
This function is not thread safe and must be included in any locks.
- Parameters
-
- Returns
- IQuery pointer on success, NULL otherwise.