SourceMod::IPreparedQuery Class Reference

Inherits SourceMod::IQuery.

Inheritance diagram for SourceMod::IPreparedQuery:

[legend]
Collaboration diagram for SourceMod::IPreparedQuery:
[legend]
List of all members.

Public Member Functions

virtual bool BindParamInt (unsigned int param, int num, bool signd=true)=0
 Binds an integer parameter.
virtual bool BindParamFloat (unsigned int param, float f)=0
 Binds a float parameter.
virtual bool BindParamNull (unsigned int param)=0
 Binds an SQL NULL type as a parameter.
virtual bool BindParamString (unsigned int param, const char *text, bool copy)=0
 Binds a string as a parameter.
virtual bool BindParamBlob (unsigned int param, const void *data, size_t length, bool copy)=0
 Binds a blob of raw data as a parameter.
virtual bool Execute ()=0
 Executes the query with the currently bound parameters.
virtual const char * GetError (int *errCode=NULL)=0
 Returns the last error message from this statement.
virtual unsigned int GetAffectedRows ()=0
 Number of rows affected by the last execute.
virtual unsigned int GetInsertID ()=0
 Retrieves the last insert ID on this database connection.

Detailed Description

Definition at line 330 of file IDBDriver.h.


Member Function Documentation

virtual bool SourceMod::IPreparedQuery::BindParamInt ( unsigned int  param,
int  num,
bool  signd = true 
) [pure virtual]

Binds an integer parameter.

Parameters:
param Parameter index, starting from 0.
num Number to bind as a value.
signd True to write as signed, false to write as unsigned.
Returns:
True on success, false otherwise.

virtual bool SourceMod::IPreparedQuery::BindParamFloat ( unsigned int  param,
float  f 
) [pure virtual]

Binds a float parameter.

Parameters:
param Parameter index, starting from 0.
f Float to bind as a value.
Returns:
True on success, false otherwise.

virtual bool SourceMod::IPreparedQuery::BindParamNull ( unsigned int  param  )  [pure virtual]

Binds an SQL NULL type as a parameter.

Parameters:
param Parameter index, starting from 0.
Returns:
True on success, false otherwise.

virtual bool SourceMod::IPreparedQuery::BindParamString ( unsigned int  param,
const char *  text,
bool  copy 
) [pure virtual]

Binds a string as a parameter.

Parameters:
param Parameter index, starting from 0.
text Pointer to a null-terminated string.
copy If true, the pointer is assumed to be volatile and a temporary copy may be made for safety.
Returns:
True on success, false otherwise.

virtual bool SourceMod::IPreparedQuery::BindParamBlob ( unsigned int  param,
const void *  data,
size_t  length,
bool  copy 
) [pure virtual]

Binds a blob of raw data as a parameter.

Parameters:
param Parameter index, starting from 0.
data Pointer to a blob of memory.
length Number of bytes to copy.
copy If true, the pointer is assumed to be volatile and a temporary copy may be made for safety.
Returns:
True on success, false otherwise.

virtual bool SourceMod::IPreparedQuery::Execute (  )  [pure virtual]

Executes the query with the currently bound parameters.

Returns:
True on success, false otherwise.

virtual const char* SourceMod::IPreparedQuery::GetError ( int *  errCode = NULL  )  [pure virtual]

Returns the last error message from this statement.

Parameters:
errCode Optional pointer to store the driver-specific error code.
Returns:
Error message string.

virtual unsigned int SourceMod::IPreparedQuery::GetAffectedRows (  )  [pure virtual]

Number of rows affected by the last execute.

Returns:
Number of rows affected by the last execute.

virtual unsigned int SourceMod::IPreparedQuery::GetInsertID (  )  [pure virtual]

Retrieves the last insert ID on this database connection.

Returns:
Row insertion ID of the last execute, if any.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 05:10:04 2008 for SourceMod SDK by  doxygen 1.5.1