Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::SQLStatement Class Reference
[SQL Database library]

SQL Statement class. More...

#include <psqlstatement.h>

List of all members.

Public Types

enum  state_t { Initial, Prepared, Executed }

Public Member Functions

 SQLStatement (SQLConnection &conn, const std::string &stmt="")
virtual ~SQLStatement ()
void prepare () throw (SQLError)
 Prepare the statement.

void exec () throw (SQLError)
 Execute the statement.

std::auto_ptr< SQLResultresult () throw (SQLError)
 Get the statement result.

sqlcount_t affectedRows () const throw ()
 Returns the number of rows affected.

void format (const std::string &fmt, const std::map< std::string, const SQLValue * > &vals)
state_t state () const throw ()
SQLConnectionconn () const throw ()
SQLStatementoperator<< (char ch)
SQLStatementoperator<< (const char *str)
SQLStatementoperator<< (const std::string &str)
SQLStatementoperator<< (const SQLValue &val)

Protected Member Functions

const std::auto_ptr< SQLDriver::StatementHandle > & handle () const throw ()

Friends

class SQLResult


Detailed Description

SQL Statement class.

Definition at line 74 of file psqlstatement.h.


Member Enumeration Documentation

enum P::SQLStatement::state_t
 

Enumeration values:
Initial 
Prepared 
Executed 

Definition at line 78 of file psqlstatement.h.


Constructor & Destructor Documentation

P::SQLStatement::SQLStatement SQLConnection conn,
const std::string &  stmt = ""
 

virtual P::SQLStatement::~SQLStatement  )  [virtual]
 


Member Function Documentation

sqlcount_t P::SQLStatement::affectedRows  )  const throw ()
 

Returns the number of rows affected.

SQLConnection& P::SQLStatement::conn  )  const throw () [inline]
 

Definition at line 104 of file psqlstatement.h.

void P::SQLStatement::exec  )  throw (SQLError)
 

Execute the statement.

void P::SQLStatement::format const std::string &  fmt,
const std::map< std::string, const SQLValue * > &  vals
 

const std::auto_ptr<SQLDriver:: StatementHandle>& P::SQLStatement::handle  )  const throw () [inline, protected]
 

Definition at line 114 of file psqlstatement.h.

SQLStatement& P::SQLStatement::operator<< const SQLValue val  ) 
 

SQLStatement& P::SQLStatement::operator<< const std::string &  str  ) 
 

SQLStatement& P::SQLStatement::operator<< const char *  str  ) 
 

SQLStatement& P::SQLStatement::operator<< char  ch  ) 
 

void P::SQLStatement::prepare  )  throw (SQLError)
 

Prepare the statement.

std::auto_ptr<SQLResult> P::SQLStatement::result  )  throw (SQLError)
 

Get the statement result.

state_t P::SQLStatement::state  )  const throw () [inline]
 

Definition at line 101 of file psqlstatement.h.


Friends And Related Function Documentation

friend class SQLResult [friend]
 

Definition at line 75 of file psqlstatement.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:36 2004 for P::Classes by doxygen 1.3.3