A class that implements a prepared query for PostgreSQL data access driver. More...
#include <PreparedQuery.h>
  
 Public Member Functions | |
| void | bind (int i, char value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, unsigned char value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, boost::int16_t value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, boost::int32_t value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, boost::int64_t value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, bool value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, float value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, double value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const std::string &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const te::dt::ByteArray &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const te::gm::Geometry &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const te::rst::Raster &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const te::dt::DateTime &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const te::da::DataSet &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (int i, const te::dt::AbstractData &ad) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | bind (const std::vector< std::size_t > &propertiesPos, std::size_t offset, te::da::DataSet *d) | 
| void | bind (const std::vector< std::size_t > &propertiesPos, te::da::DataSet *d) | 
| void | bind (te::da::DataSet *d) | 
| void | bindNumeric (int i, const std::string &value) | 
| Binds the i-th parameter of the query to a value.  More... | |
| void | clear () | 
| void | execute () | 
| std::string | getName () const | 
| It returns the prepared query name.  More... | |
| te::da::DataSourceTransactor * | getTransactor () const | 
| It returns a pointer to the underlying data source transactor.  More... | |
| void | prepare (const te::da::Query &query, const std::vector< te::dt::Property * > ¶mTypes) | 
| It prepares the query that may be used for commands that are used mutiple times (select, insert, update and delete).  More... | |
| void | prepare (const std::string &query, const std::vector< te::dt::Property * > ¶mTypes) | 
| It prepares the query using native dialect.  More... | |
| void | prepare (const std::string &query, const std::vector< int > ¶mTypes) | 
| PreparedQuery (Transactor *t, const std::string &pqname) | |
| te::da::DataSet * | query (te::common::TraverseType travType=te::common::FORWARDONLY, te::common::AccessPolicy rwRole=te::common::RAccess) | 
| ~PreparedQuery () | |
| Virtual destructor.  More... | |
Private Attributes | |
| PGconn * | m_conn | 
| std::size_t | m_nparams | 
| int * | m_paramFormats | 
| int * | m_paramLengths | 
| char ** | m_paramValues | 
| std::string | m_qname | 
| PGresult * | m_result | 
| Transactor * | m_t | 
A class that implements a prepared query for PostgreSQL data access driver.
Definition at line 68 of file PreparedQuery.h.
| te::pgis::PreparedQuery::PreparedQuery | ( | Transactor * | t, | 
| const std::string & | pqname | ||
| ) | 
Definition at line 135 of file PreparedQuery.cpp.
References te::common::Convert2LCase(), te::pgis::Connection::getConn(), te::pgis::Transactor::getConnection(), m_conn, m_qname, and m_t.
      
  | 
  virtual | 
Virtual destructor.
Reimplemented from te::da::PreparedQuery.
Definition at line 150 of file PreparedQuery.cpp.
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 226 of file PreparedQuery.cpp.
Referenced by te::pgis::BindValue().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 237 of file PreparedQuery.cpp.
References TR_PGIS.
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 242 of file PreparedQuery.cpp.
References te::common::Swap2Bytes().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 257 of file PreparedQuery.cpp.
References te::common::Swap4Bytes().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 272 of file PreparedQuery.cpp.
References te::common::Swap8Bytes().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 287 of file PreparedQuery.cpp.
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 300 of file PreparedQuery.cpp.
References te::common::Swap4Bytes().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 315 of file PreparedQuery.cpp.
References te::common::Swap8Bytes().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 342 of file PreparedQuery.cpp.
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 354 of file PreparedQuery.cpp.
References te::dt::ByteArray::bytesUsed(), and te::dt::ByteArray::getData().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 366 of file PreparedQuery.cpp.
References te::gm::Geometry::getWkbSize(), and te::pgis::EWKBWriter::write().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 383 of file PreparedQuery.cpp.
References TR_PGIS.
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 388 of file PreparedQuery.cpp.
References te::dt::AbstractData::toString().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 418 of file PreparedQuery.cpp.
References TR_PGIS.
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Reimplemented from te::da::PreparedQuery.
Definition at line 423 of file PreparedQuery.cpp.
References TR_PGIS.
| void te::pgis::PreparedQuery::bind | ( | const std::vector< std::size_t > & | propertiesPos, | 
| std::size_t | offset, | ||
| te::da::DataSet * | d | ||
| ) | 
Definition at line 468 of file PreparedQuery.cpp.
References te::pgis::BindValue().
| void te::pgis::PreparedQuery::bind | ( | const std::vector< std::size_t > & | propertiesPos, | 
| te::da::DataSet * | d | ||
| ) | 
Definition at line 476 of file PreparedQuery.cpp.
References te::pgis::BindValue().
| void te::pgis::PreparedQuery::bind | ( | te::da::DataSet * | d | ) | 
Definition at line 484 of file PreparedQuery.cpp.
References te::pgis::BindValue().
      
  | 
  virtual | 
Binds the i-th parameter of the query to a value.
| i | The parameter index. | 
| value | The parameter value. | 
Implements te::da::PreparedQuery.
Definition at line 330 of file PreparedQuery.cpp.
Referenced by te::pgis::BindValue().
| void te::pgis::PreparedQuery::clear | ( | ) | 
Definition at line 490 of file PreparedQuery.cpp.
      
  | 
  virtual | 
Implements te::da::PreparedQuery.
Definition at line 183 of file PreparedQuery.cpp.
References TR_PGIS.
      
  | 
  virtual | 
It returns the prepared query name.
| return | The prepared query name. | 
Implements te::da::PreparedQuery.
Definition at line 161 of file PreparedQuery.cpp.
      
  | 
  virtual | 
It returns a pointer to the underlying data source transactor.
Implements te::da::PreparedQuery.
Definition at line 428 of file PreparedQuery.cpp.
      
  | 
  virtual | 
It prepares the query that may be used for commands that are used mutiple times (select, insert, update and delete).
This command will submit a request to create a prepared query with the given parameters.
| query | The query to be prepared. | 
| paramTypes | The list of parameters data type. | 
| Exception | It throws an exception if the prepared query can not be created. For example if another prepared query with the same name already exists, this may throws an exception. | 
Implements te::da::PreparedQuery.
Definition at line 166 of file PreparedQuery.cpp.
References te::common::BaseVisitable< T, R >::accept(), and te::pgis::DataSource::getDialect().
      
  | 
  virtual | 
It prepares the query using native dialect.
This command may be used for commands that are used mutiple times (select, insert, update and delete).
This command will submit a request to create a prepared query with the given parameters.
| query | The query to be prepared. | 
| paramTypes | The list of parameters data type. | 
| Exception | It throws an exception if the prepared query can not be created. For example if another prepared query with the same name already exists, this may throws an exception. | 
Implements te::da::PreparedQuery.
Definition at line 178 of file PreparedQuery.cpp.
References TR_PGIS.
| void te::pgis::PreparedQuery::prepare | ( | const std::string & | query, | 
| const std::vector< int > & | paramTypes | ||
| ) | 
Definition at line 433 of file PreparedQuery.cpp.
References TR_PGIS.
      
  | 
  virtual | 
Implements te::da::PreparedQuery.
Definition at line 209 of file PreparedQuery.cpp.
References te::pgis::Convert2TerraLib(), te::pgis::DataSource::getGeomTypeId(), te::pgis::DataSource::getRasterTypeId(), and te::pgis::DataSource::isTimeAnInteger().
      
  | 
  private | 
Definition at line 149 of file PreparedQuery.h.
Referenced by PreparedQuery().
      
  | 
  private | 
Definition at line 154 of file PreparedQuery.h.
      
  | 
  private | 
Definition at line 153 of file PreparedQuery.h.
      
  | 
  private | 
Definition at line 152 of file PreparedQuery.h.
      
  | 
  private | 
Definition at line 151 of file PreparedQuery.h.
      
  | 
  private | 
Definition at line 155 of file PreparedQuery.h.
Referenced by PreparedQuery().
      
  | 
  private | 
Definition at line 150 of file PreparedQuery.h.
      
  | 
  private | 
Definition at line 148 of file PreparedQuery.h.
Referenced by PreparedQuery().