SourceMod SDK  1.7
SourceMod::IPreparedQuery Class Referenceabstract
Inheritance diagram for SourceMod::IPreparedQuery:
SourceMod::IQuery

Public Member Functions

virtual bool BindParamInt (unsigned int param, int num, bool signd=true)=0
 Binds an integer parameter. More...
 
virtual bool BindParamFloat (unsigned int param, float f)=0
 Binds a float parameter. More...
 
virtual bool BindParamNull (unsigned int param)=0
 Binds an SQL NULL type as a parameter. More...
 
virtual bool BindParamString (unsigned int param, const char *text, bool copy)=0
 Binds a string as a parameter. More...
 
virtual bool BindParamBlob (unsigned int param, const void *data, size_t length, bool copy)=0
 Binds a blob of raw data as a parameter. More...
 
virtual bool Execute ()=0
 Executes the query with the currently bound parameters. More...
 
virtual const char * GetError (int *errCode=NULL)=0
 Returns the last error message from this statement. More...
 
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...
 
- Public Member Functions inherited from SourceMod::IQuery
virtual IResultSetGetResultSet ()=0
 Returns a pointer to the current result set, if any. More...
 
virtual bool FetchMoreResults ()=0
 Advances to the next result set if one exists. This is for checking for MORE result sets, and should not be used on the first result set. More...
 
virtual void Destroy ()=0
 Frees resources created by this query.
 

Member Function Documentation

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
paramParameter index, starting from 0.
dataPointer to a blob of memory.
lengthNumber of bytes to copy.
copyIf 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::BindParamFloat ( unsigned int  param,
float  f 
)
pure virtual

Binds a float parameter.

Parameters
paramParameter index, starting from 0.
fFloat to bind as a value.
Returns
True on success, false otherwise.
virtual bool SourceMod::IPreparedQuery::BindParamInt ( unsigned int  param,
int  num,
bool  signd = true 
)
pure virtual

Binds an integer parameter.

Parameters
paramParameter index, starting from 0.
numNumber to bind as a value.
signdTrue to write as signed, false to write as unsigned.
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
paramParameter 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
paramParameter index, starting from 0.
textPointer to a null-terminated string.
copyIf 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 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 const char* SourceMod::IPreparedQuery::GetError ( int *  errCode = NULL)
pure virtual

Returns the last error message from this statement.

Parameters
errCodeOptional pointer to store the driver-specific error code.
Returns
Error message string.
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: