Anope IRC Services  Version 2.0
Public Member Functions | Data Fields | Protected Attributes
SQL::Result Class Reference

#include <sql.h>

Inheritance diagram for SQL::Result:
Inheritance graph
[legend]
Collaboration diagram for SQL::Result:
Collaboration graph
[legend]

Public Member Functions

 Result ()
 
 Result (unsigned int i, const Query &q, const Anope::string &fq, const Anope::string &err="")
 
 operator bool () const
 
const unsigned int GetID () const
 
const QueryGetQuery () 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
 
Query query
 
Anope::string error
 

Detailed Description

A result from a SQL query

Definition at line 135 of file sql.h.

Constructor & Destructor Documentation

SQL::Result::Result ( )
inline

Definition at line 146 of file sql.h.

SQL::Result::Result ( unsigned int  i,
const Query q,
const Anope::string fq,
const Anope::string err = "" 
)
inline

Definition at line 147 of file sql.h.

Member Function Documentation

const Anope::string SQL::Result::Get ( size_t  index,
const Anope::string col 
) const
inline
const Anope::string& SQL::Result::GetError ( ) const
inline
const unsigned int SQL::Result::GetID ( ) const
inline

Definition at line 151 of file sql.h.

References id.

Referenced by DBMySQL::OnNotify(), and DBSQL::OnNotify().

const Query& SQL::Result::GetQuery ( ) const
inline

Definition at line 152 of file sql.h.

References query.

SQL::Result::operator bool ( ) const
inline

Definition at line 149 of file sql.h.

References Anope::string::empty().

const std::map<Anope::string, Anope::string>& SQL::Result::Row ( size_t  index) const
inline

Definition at line 157 of file sql.h.

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

int SQL::Result::Rows ( ) const
inline

Field Documentation

std::vector<std::map<Anope::string, Anope::string> > SQL::Result::entries
protected

Definition at line 139 of file sql.h.

Anope::string SQL::Result::error
protected

Definition at line 141 of file sql.h.

Referenced by GetError().

Anope::string SQL::Result::finished_query

Definition at line 144 of file sql.h.

Referenced by DBMySQL::RunQueryResult().

unsigned int SQL::Result::id

Definition at line 143 of file sql.h.

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

Query SQL::Result::query
protected

Definition at line 140 of file sql.h.

Referenced by GetQuery().


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