2006-06-03 19:52:21 +00:00
|
|
|
#ifndef _INCLUDE_SOURCEMOD_SQLITE_QUERY_H
|
|
|
|
#define _INCLUDE_SOURCEMOD_SQLITE_QUERY_H
|
|
|
|
|
|
|
|
#include "SqliteHeaders.h"
|
|
|
|
|
|
|
|
namespace SourceMod
|
|
|
|
{
|
|
|
|
class SqliteDatabase;;
|
|
|
|
class SqliteResultSet;
|
|
|
|
|
|
|
|
class SqliteQuery : public IQuery
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct SqliteResults
|
|
|
|
{
|
|
|
|
char **results;
|
|
|
|
int rows;
|
|
|
|
int cols;
|
|
|
|
};
|
|
|
|
public:
|
|
|
|
SqliteQuery(SqliteDatabase *db, const char *query);
|
|
|
|
~SqliteQuery();
|
|
|
|
public:
|
|
|
|
void FreeHandle();
|
|
|
|
bool Execute(QueryInfo *info, char *error, size_t maxlength);
|
|
|
|
bool ExecuteR(QueryInfo *info, char *error, size_t maxlength);
|
2006-08-28 19:17:26 +00:00
|
|
|
bool Execute2(QueryInfo *info, char *error, size_t maxlength);
|
2006-08-18 02:19:38 +00:00
|
|
|
const char *GetQueryString();
|
2006-06-03 19:52:21 +00:00
|
|
|
private:
|
|
|
|
SqliteDatabase *m_pDatabase;
|
|
|
|
SqliteResultSet *m_LastRes;
|
|
|
|
char *m_QueryString;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_SQLITE_QUERY_H
|