26 #ifndef __TERRALIB_POSTGIS_INTERNAL_CONNECTED_DATASET_H 27 #define __TERRALIB_POSTGIS_INTERNAL_CONNECTED_DATASET_H 30 #include "../dataaccess/dataset/DataSet.h" 48 class GeometryProperty;
80 const int& connectionId,
81 const std::string& id_cursor,
83 const std::vector<int>& ptypes,
84 bool timeIsInteger =
true,
85 int newFetchSize = 5000);
94 std::size_t getNumProperties()
const;
96 int getPropertyDataType(std::size_t i)
const;
98 std::string getPropertyName(std::size_t i)
const;
100 std::string getDatasetNameOfProperty(std::size_t i)
const;
102 bool isEmpty()
const;
104 bool isConnected()
const;
106 std::size_t size()
const;
108 std::unique_ptr<te::gm::Envelope> getExtent(std::size_t i);
114 bool moveBeforeFirst();
120 bool move(std::size_t i);
122 bool isAtBegin()
const;
124 bool isBeforeBegin()
const;
126 bool isAtEnd()
const;
128 bool isAfterEnd()
const;
130 bool isPositionValid()
const;
132 char getChar(std::size_t i)
const;
134 unsigned char getUChar(std::size_t i)
const;
136 boost::int16_t getInt16(std::size_t i)
const;
138 boost::int32_t getInt32(std::size_t i)
const;
140 boost::int64_t getInt64(std::size_t i)
const;
142 bool getBool(std::size_t i)
const;
144 float getFloat(std::size_t i)
const;
146 double getDouble(std::size_t i)
const;
148 std::string getNumeric(std::size_t i)
const;
150 std::string getString(std::size_t i)
const;
152 std::unique_ptr<te::dt::ByteArray> getByteArray(std::size_t i)
const;
154 std::unique_ptr<te::gm::Geometry> getGeometry(std::size_t i)
const;
156 std::unique_ptr<te::rst::Raster> getRaster(std::size_t i)
const;
158 std::unique_ptr<te::dt::DateTime> getDateTime(std::size_t i)
const;
160 std::unique_ptr<te::dt::Array> getArray(std::size_t i)
const;
162 bool isNull(std::size_t i)
const;
200 #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.
PGresult * getPGResult() const
It returns the internal pg result.
int m_connectionId
The connection id used by this dataset.
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.
Implementation of a connected dataset for the PostGIS driver.
#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:
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 class that implements a connection to a PostgreSQL database.
DataSource * m_ds
The DataSource to get the connection.
A dataset is the unit of information manipulated by the data access module of TerraLib.
int m_newFetchSize
The size to be used every time we need to fetch more date.
std::vector< int > m_ptypes
The list of property types.
int m_iLayer
The index of total layer of the current row.
te::gm::Envelope * m_mbr
The dataset extent.