A class that implements a connection to a ADO database. More...
#include <Connection.h>
Public Member Functions | |
| Connection (const std::string &conninfo) | |
| Constructor. More... | |
| void | execute (const std::string &command) |
| It executes the given SQL command and throws away the result. More... | |
| _ConnectionPtr | getConn () const |
| It gets the ADO Connection object. More... | |
| bool | isValid () |
| _RecordsetPtr | query (const std::string &query, bool connected=false) |
| It queries the database. More... | |
| ~Connection () | |
| Destructor. More... | |
Public Attributes | |
| _ConnectionPtr | m_conn |
| The ADO real connection handle. More... | |
Friends | |
| class | ConnectionPool |
A class that implements a connection to a ADO database.
This class models a physical connection to a ADO data source. It is designed to work with the connection pool.
Definition at line 60 of file ado/Connection.h.
| te::ado::Connection::Connection | ( | const std::string & | conninfo | ) |
Constructor.
| conninfo | A coonection string as undertood by ADO. |
| inuse | A marker that tells if the connection is in use or not. |
Definition at line 44 of file ado/Connection.cpp.
| te::ado::Connection::~Connection | ( | ) |
| void te::ado::Connection::execute | ( | const std::string & | command | ) |
It executes the given SQL command and throws away the result.
| command | Any SQL command. |
| Exception | It throws an exception if the query execution fails. |
Definition at line 111 of file ado/Connection.cpp.
Referenced by te::ado::Transactor::dropProperty(), and te::ado::Transactor::execute().
|
inline |
It gets the ADO Connection object.
Definition at line 102 of file ado/Connection.h.
Referenced by te::ado::Transactor::add(), te::ado::Transactor::addForeignKey(), te::ado::Transactor::addIndex(), te::ado::Transactor::addPrimaryKey(), te::ado::Transactor::addProperty(), te::ado::Transactor::addUniqueKey(), te::ado::Transactor::begin(), te::ado::Transactor::commit(), te::ado::Transactor::createDataSet(), te::ado::Transactor::dropDataSet(), te::ado::Transactor::dropForeignKey(), te::ado::Transactor::dropPrimaryKey(), te::ado::Transactor::dropProperty(), te::ado::Transactor::dropUniqueKey(), te::ado::Transactor::execute(), te::ado::Transactor::getCheckConstraints(), te::ado::Transactor::getDataSetNames(), te::ado::Transactor::getIndexes(), te::ado::Transactor::getPrimaryKey(), te::ado::Transactor::getProperties(), te::ado::Transactor::getUniqueKeys(), te::ado::Transactor::insertIntoGeometryColumns(), te::ado::Transactor::propertyExists(), te::ado::Transactor::query(), te::ado::Transactor::remove(), te::ado::Transactor::renameProperty(), and te::ado::Transactor::rollBack().
| bool te::ado::Connection::isValid | ( | ) |
Definition at line 125 of file ado/Connection.cpp.
References m_conn.
| _RecordsetPtr te::ado::Connection::query | ( | const std::string & | query, |
| bool | connected = false |
||
| ) |
It queries the database.
| query | A SQL Select command. |
| Exception | It throws an exception if the query execution fails. |
Definition at line 91 of file ado/Connection.cpp.
References m_conn, TE_TR, and TESTHR().
Referenced by te::ado::Transactor::query().
|
friend |
Definition at line 111 of file ado/Connection.h.
| _ConnectionPtr te::ado::Connection::m_conn |
The ADO real connection handle.
Definition at line 109 of file ado/Connection.h.
Referenced by Connection(), execute(), isValid(), query(), and ~Connection().