Public Member Functions | Data Fields | Protected Attributes

SQLResult Class Reference

#include <sql.h>

Inherited by MySQLResult, and SQLiteResult.

Collaboration diagram for SQLResult:
Collaboration graph
[legend]

Public Member Functions

 SQLResult ()
 SQLResult (unsigned int i, const SQLQuery &q, const Anope::string &fq, const Anope::string &err="")
 operator bool () const
const unsigned int GetID () const
const SQLQueryGetQuery () const
const Anope::stringGetError () const
int Rows () const
const std::map< Anope::string,
Anope::string > & 
Row (size_t index) const
const Anope::string Get (size_t index, const Anope::string &col) const

Data Fields

unsigned int id
Anope::string finished_query

Protected Attributes

std::vector< std::map
< Anope::string, Anope::string > > 
entries
SQLQuery query
Anope::string error

Detailed Description

A result from a SQL query

Definition at line 60 of file sql.h.


Constructor & Destructor Documentation

SQLResult::SQLResult (  )  [inline]

Definition at line 71 of file sql.h.

SQLResult::SQLResult ( unsigned int  i,
const SQLQuery q,
const Anope::string fq,
const Anope::string err = "" 
) [inline]

Definition at line 72 of file sql.h.


Member Function Documentation

const Anope::string SQLResult::Get ( size_t  index,
const Anope::string col 
) const [inline]
const Anope::string& SQLResult::GetError (  )  const [inline]
const unsigned int SQLResult::GetID (  )  const [inline]

Definition at line 76 of file sql.h.

References id.

Referenced by DBMySQL::OnNotify().

const SQLQuery& SQLResult::GetQuery (  )  const [inline]

Definition at line 77 of file sql.h.

References query.

SQLResult::operator bool (  )  const [inline]

Definition at line 74 of file sql.h.

References Anope::string::empty(), and error.

const std::map<Anope::string, Anope::string>& SQLResult::Row ( size_t  index  )  const [inline]

Definition at line 82 of file sql.h.

References entries.

Referenced by Get(), MChanstats::GetTables(), and DBMySQL::OnSerializeCheck().

int SQLResult::Rows (  )  const [inline]

Field Documentation

std::vector<std::map<Anope::string, Anope::string> > SQLResult::entries [protected]

Definition at line 64 of file sql.h.

Referenced by SQLiteResult::addRow(), MySQLResult::MySQLResult(), Row(), and Rows().

Definition at line 66 of file sql.h.

Referenced by GetError(), and operator bool().

Definition at line 69 of file sql.h.

Referenced by DBMySQL::RunQueryResult().

unsigned int SQLResult::id

Definition at line 68 of file sql.h.

Referenced by GetID(), and SQLiteService::RunQuery().

Definition at line 65 of file sql.h.

Referenced by GetQuery().


The documentation for this class was generated from the following file: