The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SQLerror Class Reference

SQLerror holds the error state of any SQLrequest or SQLresult. More...

#include <m_sqlv2.h>

Inheritance diagram for SQLerror:

Inheritance graph
[legend]
Collaboration diagram for SQLerror:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SQLerror (SQLerrorNum i=SQL_NO_ERROR, const std::string &s="")
 Initialize an SQLerror.
SQLerrorNum Id ()
 Return the ID of the error.
SQLerrorNum Id (SQLerrorNum i)
 Set the ID of an error.
void Str (const std::string &s)
 Set the error string for an error.
const char * Str ()
 Return the error string for an error.

Private Attributes

SQLerrorNum id
 The error id.
std::string str
 The error string.

Detailed Description

SQLerror holds the error state of any SQLrequest or SQLresult.

The error string varies from database software to database software and should be used to display informational error messages to users.

Definition at line 64 of file m_sqlv2.h.


Constructor & Destructor Documentation

SQLerror::SQLerror SQLerrorNum  i = SQL_NO_ERROR,
const std::string s = ""
[inline]
 

Initialize an SQLerror.

Parameters:
i The error ID to set
s The (optional) error string to set

Definition at line 77 of file m_sqlv2.h.


Member Function Documentation

SQLerrorNum SQLerror::Id SQLerrorNum  i  )  [inline]
 

Set the ID of an error.

Parameters:
i The new error ID to set
Returns:
the ID which was set

Definition at line 93 of file m_sqlv2.h.

References id.

SQLerrorNum SQLerror::Id  )  [inline]
 

Return the ID of the error.

Definition at line 84 of file m_sqlv2.h.

References id.

Referenced by SQLConn::DoConnectedPoll(), ModuleTestClient::OnRequest(), ModuleSQLOper::OnRequest(), ModuleSQLite3::OnRequest(), ModuleSQLAuth::OnRequest(), ModulePgSQL::OnRequest(), ModuleSQL::OnRequest(), and ModuleMsSQL::OnRequest().

const char* SQLerror::Str  )  [inline]
 

Return the error string for an error.

Definition at line 109 of file m_sqlv2.h.

References id, SQL_BAD_CONN, SQL_BAD_DBID, SQL_NO_ERROR, SQL_QREPLY_FAIL, SQL_QSEND_FAIL, and str.

void SQLerror::Str const std::string s  )  [inline]
 

Set the error string for an error.

Parameters:
s The new error string to set

Definition at line 102 of file m_sqlv2.h.

References str.

Referenced by ModuleSQLAuth::CheckCredentials(), SQLConn::DoConnectedPoll(), ModuleTestClient::OnBackgroundTimer(), ModuleTestClient::OnRequest(), and ModuleSQLAuth::OnRequest().


Member Data Documentation

SQLerrorNum SQLerror::id [private]
 

The error id.

Definition at line 68 of file m_sqlv2.h.

Referenced by Id(), and Str().

std::string SQLerror::str [private]
 

The error string.

Definition at line 71 of file m_sqlv2.h.

Referenced by Str().


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