Anope IRC Services  Version 2.0
Public Member Functions | Private Member Functions | Private Attributes
SQLiteService Class Reference
Inheritance diagram for SQLiteService:
Inheritance graph
Collaboration diagram for SQLiteService:
Collaboration graph

Public Member Functions

 SQLiteService (Module *o, const Anope::string &n, const Anope::string &d)
 ~SQLiteService ()
void Run (Interface *i, const Query &query) anope_override
Result RunQuery (const Query &query)
std::vector< QueryCreateTable (const Anope::string &table, const Data &data) anope_override
Query BuildInsert (const Anope::string &table, unsigned int id, Data &data)
Query GetTables (const Anope::string &prefix)
Anope::string BuildQuery (const Query &q)
Anope::string FromUnixtime (time_t)
- Public Member Functions inherited from SQL::Provider
 Provider (Module *c, const Anope::string &n)
- Public Member Functions inherited from Service
 Service (Module *o, const Anope::string &t, const Anope::string &n)
virtual ~Service ()
void Register ()
void Unregister ()
- Public Member Functions inherited from Base
 Base ()
virtual ~Base ()
void AddReference (ReferenceBase *r)
void DelReference (ReferenceBase *r)

Private Member Functions

Anope::string Escape (const Anope::string &query)

Private Attributes

std::map< Anope::string, std::set< Anope::string > > active_schema
Anope::string database
sqlite3 * sql

Additional Inherited Members

- Static Public Member Functions inherited from Service
static ServiceFindService (const Anope::string &t, const Anope::string &n)
static std::vector< Anope::stringGetServiceKeys (const Anope::string &t)
static void AddAlias (const Anope::string &t, const Anope::string &n, const Anope::string &v)
static void DelAlias (const Anope::string &t, const Anope::string &n)
- Data Fields inherited from Service
Anope::string type
Anope::string name

Detailed Description

A SQLite database, there can be multiple

Definition at line 33 of file m_sqlite.cpp.

Constructor & Destructor Documentation

◆ SQLiteService()

SQLiteService::SQLiteService ( Module o,
const Anope::string n,
const Anope::string d 

Definition at line 128 of file m_sqlite.cpp.

References Anope::string::c_str(), database, and sql.

◆ ~SQLiteService()

SQLiteService::~SQLiteService ( )

Definition at line 136 of file m_sqlite.cpp.

References sql.

Member Function Documentation

◆ BuildInsert()

Query SQLiteService::BuildInsert ( const Anope::string table,
unsigned int  id,
Data data 

◆ BuildQuery()

Anope::string SQLiteService::BuildQuery ( const Query q)

Definition at line 302 of file m_sqlite.cpp.

References SQL::Query::parameters, SQL::Query::query, and Anope::string::replace_all_cs().

Referenced by RunQuery().

◆ CreateTable()

std::vector< Query > SQLiteService::CreateTable ( const Anope::string table,
const Data data 

◆ Escape()

Anope::string SQLiteService::Escape ( const Anope::string query)

Definition at line 294 of file m_sqlite.cpp.

References Anope::string::c_str().

◆ FromUnixtime()

Anope::string SQLiteService::FromUnixtime ( time_t  t)

Implements SQL::Provider.

Definition at line 312 of file m_sqlite.cpp.

References MODULE_INIT, and stringify().

◆ GetTables()

Query SQLiteService::GetTables ( const Anope::string prefix)

Implements SQL::Provider.

Definition at line 289 of file m_sqlite.cpp.

◆ Run()

void SQLiteService::Run ( Interface i,
const Query query 

◆ RunQuery()

Result SQLiteService::RunQuery ( const Query query)

Field Documentation

◆ active_schema

std::map<Anope::string, std::set<Anope::string> > SQLiteService::active_schema

Definition at line 35 of file m_sqlite.cpp.

Referenced by BuildInsert(), and CreateTable().

◆ database

Anope::string SQLiteService::database

Definition at line 37 of file m_sqlite.cpp.

Referenced by SQLiteService().

◆ sql

sqlite3* SQLiteService::sql

Definition at line 39 of file m_sqlite.cpp.

Referenced by RunQuery(), SQLiteService(), and ~SQLiteService().

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