A class that implements a connection to a ADO database.
More...
#include <Connection.h>
|
| | Connection (const std::string &conninfo) |
| | Constructor.
|
| |
| void | execute (const std::string &command) |
| | It executes the given SQL command and throws away the result.
|
| |
| _ConnectionPtr | getConn () const |
| | It gets the ADO Connection object.
|
| |
| bool | isValid () |
| |
| _RecordsetPtr | query (const std::string &query, bool connected=false) |
| | It queries the database.
|
| |
| | ~Connection () |
| | Destructor.
|
| |
|
| _ConnectionPtr | m_conn |
| | The ADO real connection handle.
|
| |
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.
- See also
- ConnectionPool
Definition at line 60 of file Connection.h.
◆ Connection()
| te::ado::Connection::Connection |
( |
const std::string & |
conninfo | ) |
|
Constructor.
- Parameters
-
| conninfo | A coonection string as undertood by ADO. |
| inuse | A marker that tells if the connection is in use or not. |
◆ ~Connection()
| te::ado::Connection::~Connection |
( |
| ) |
|
◆ execute()
| void te::ado::Connection::execute |
( |
const std::string & |
command | ) |
|
It executes the given SQL command and throws away the result.
- Parameters
-
- Exceptions
-
| Exception | It throws an exception if the query execution fails. |
◆ getConn()
| _ConnectionPtr te::ado::Connection::getConn |
( |
| ) |
const |
|
inline |
◆ isValid()
| bool te::ado::Connection::isValid |
( |
| ) |
|
◆ query()
| _RecordsetPtr te::ado::Connection::query |
( |
const std::string & |
query, |
|
|
bool |
connected = false |
|
) |
| |
It queries the database.
- Parameters
-
| query | A SQL Select command. |
- Returns
- A resultset. The caller of this method will take its ownership.
- Exceptions
-
| Exception | It throws an exception if the query execution fails. |
◆ ConnectionPool
| friend class ConnectionPool |
|
friend |
◆ m_conn
| _ConnectionPtr te::ado::Connection::m_conn |
The ADO real connection handle.
Definition at line 109 of file Connection.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/ado/Connection.h