Main | License | Installation | FAQ | Screenshots | Contact | Links | Sf.net | Freshmeat.net | KDE-Apps.org
Requirements | Design | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Database Class Reference
[MySQL C++ Wrappers]

#include <database.hpp>

Inheritance diagram for Database:

Inheritance graph
[legend]

Public Member Functions

 Database (ServerPtr _server)
virtual StatementPtr execQuery (const std::string &query)=0 throw (Error)
void execScript (const std::string &script) throw (Error)
 Execute list of queries.
void execScript (std::istream &stream) throw (Error)
 Execute list of queries.
ServerPtr getServer (void) const
 Get server object.

Protected Attributes

ServerPtr server

Detailed Description

Abstract class for accessing databases.
Date:
Thu Mar 03 2005
Author:
Jan Wedekind (wedesoft@users.sourceforge.net)

Definition at line 30 of file database.hpp.


Constructor & Destructor Documentation

Database::Database ( ServerPtr  _server  )  [inline]

Constructor. The user name is just copied to the member variable.

Parameters:
_server Server object.

Definition at line 36 of file database.hpp.

00036 : server( _server ) {}


Member Function Documentation

virtual StatementPtr Database::execQuery ( const std::string &  query  )  throw (Error) [pure virtual]

Execute single query. The returned Statement object allows requesting the results of the query.

Implemented in MySQLDatabase, and ODBCDatabase.

void Database::execScript ( const std::string &  script  )  throw (Error)

Execute list of queries.

Definition at line 21 of file database.cpp.

00022 {
00023   istringstream stream( script );
00024   execScript( stream );
00025 }

void Database::execScript ( std::istream &  stream  )  throw (Error)

Execute list of queries.

ServerPtr Database::getServer ( void   )  const [inline]

Get server object.

Definition at line 47 of file database.hpp.

References server.

00047 { return server; }


Field Documentation

ServerPtr Database::server [protected]

Definition at line 50 of file database.hpp.

Referenced by getServer().


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

anymeal 0.30 - recipe management software - Make the most of your food! - © Jan Wedekind Sun Sep 14 16:01:29 2008 - GNU Free Documentation License