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

◆ Result() [1/2]

SQL::Result::Result ( )
inline

Definition at line 146 of file sql.h.

◆ Result() [2/2]

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

◆ Get()

const Anope::string SQL::Result::Get ( size_t  index,
const Anope::string col 
) const
inline

◆ GetError()

const Anope::string& SQL::Result::GetError ( ) const
inline

◆ GetID()

const unsigned int SQL::Result::GetID ( ) const
inline

Definition at line 151 of file sql.h.

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

◆ GetQuery()

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

Definition at line 152 of file sql.h.

◆ operator bool()

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

Definition at line 149 of file sql.h.

References Anope::string::empty().

◆ Row()

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 IRC2SQL::GetTables(), MChanstats::GetTables(), and DBMySQL::OnSerializeCheck().

◆ Rows()

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

Field Documentation

◆ entries

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

Definition at line 139 of file sql.h.

◆ error

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

Definition at line 141 of file sql.h.

◆ finished_query

Anope::string SQL::Result::finished_query

Definition at line 144 of file sql.h.

Referenced by DBMySQL::RunQueryResult().

◆ id

unsigned int SQL::Result::id

Definition at line 143 of file sql.h.

Referenced by SQLiteService::RunQuery().

◆ query

Query SQL::Result::query
protected

Definition at line 140 of file sql.h.


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