26 #ifndef __TERRALIB_POSTGIS_INTERNAL_CONNECTED_DATASET_H
27 #define __TERRALIB_POSTGIS_INTERNAL_CONNECTED_DATASET_H
30 #include "../dataaccess/dataset/DataSet.h"
31 #include "../postgis/Connection.h"
49 class GeometryProperty;
77 const std::string& id_cursor,
79 const std::vector<int>& ptypes,
80 bool timeIsInteger =
true);
89 std::size_t getNumProperties()
const;
91 int getPropertyDataType(std::size_t i)
const;
93 std::string getPropertyName(std::size_t i)
const;
95 std::string getDatasetNameOfProperty(std::size_t i)
const;
99 bool isConnected()
const;
101 std::size_t size()
const;
103 std::auto_ptr<te::gm::Envelope> getExtent(std::size_t i);
109 bool moveBeforeFirst();
115 bool move(std::size_t i);
117 bool isAtBegin()
const;
119 bool isBeforeBegin()
const;
121 bool isAtEnd()
const;
123 bool isAfterEnd()
const;
125 char getChar(std::size_t i)
const;
127 unsigned char getUChar(std::size_t i)
const;
129 boost::int16_t getInt16(std::size_t i)
const;
131 boost::int32_t getInt32(std::size_t i)
const;
133 boost::int64_t getInt64(std::size_t i)
const;
135 bool getBool(std::size_t i)
const;
137 float getFloat(std::size_t i)
const;
139 double getDouble(std::size_t i)
const;
141 std::string getNumeric(std::size_t i)
const;
143 std::string getString(std::size_t i)
const;
145 std::auto_ptr<te::dt::ByteArray> getByteArray(std::size_t i)
const;
147 std::auto_ptr<te::gm::Geometry> getGeometry(std::size_t i)
const;
149 std::auto_ptr<te::rst::Raster> getRaster(std::size_t i)
const;
151 std::auto_ptr<te::dt::DateTime> getDateTime(std::size_t i)
const;
153 std::auto_ptr<te::dt::Array> getArray(std::size_t i)
const;
155 bool isNull(std::size_t i)
const;
191 #endif // __TERRALIB_POSTGIS_INTERNAL_CONNECTED_DATASET_H
int m_iFetch
The index of the current row of current fetch.
bool m_timeIsInteger
It indicates if the postgis stores, internally, the time and timestamp as an integer.
struct pg_result PGresult
int m_size
The number of datasets in the collection.
PGresult * m_result
The internal buffer with the result query.
std::string m_idcursor
The id of current cursor.
A class that implements a connection to a PostgreSQL database.
Implementation of a connected dataset for the PostGIS driver.
Connection * getConnection() const
#define TEPGISEXPORT
You can use this macro in order to export/import classes and functions from this module.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
PGresult * getPGResult() const
It returns the internal pg result.
An Envelope defines a 2D rectangular region.
Configuration flags for the PostGIS Driver Implementation of TerraLib.
int m_fetchSize
The size of cursor fetch.
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::vector< int > m_ptypes
The list of property types.
Connection * m_conn
The connection used by this dataset.
int m_iLayer
The index of total layer of the current row.
te::gm::Envelope * m_mbr
The dataset extent.