Go to the documentation of this file.
26 #ifndef __TERRALIB_POSTGIS_INTERNAL_DATASOURCE_H
27 #define __TERRALIB_POSTGIS_INTERNAL_DATASOURCE_H
30 #include "../dataaccess/datasource/DataSource.h"
31 #include "../dataaccess/datasource/DataSourceCapabilities.h"
36 namespace core {
class URI; }
37 namespace gm {
class GeometryProperty; }
38 namespace rst {
class RasterProperty; }
150 void create(
const std::string& connInfo);
152 void drop(
const std::string& connInfo);
154 bool exists(
const std::string& connInfo);
173 #endif // __TERRALIB_POSTGIS_INTERNAL_DATASOURCE_H
This class implements a connection pool for the PostGIS driver.
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
It represents the SQL query dialect accepted by a given data source.
void closeConnection(Connection *conn)
void setTimeAsInteger(bool timeIsInteger)
static te::da::DataSourceCapabilities sm_capabilities
PostGIS capabilities.
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
std::string m_currentSchema
The default schema used when no one is provided.
unsigned int getGeomTypeId() const
It returns the type id associated to the PostGIS Geometry type.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
DataSource(const std::string &connInfo)
DataSource(const te::core::URI &uri)
bool isValid() const
It checks if the data source is valid (available for using).
~DataSource()
Virtual destructor.
A class that implements a connection to a PostgreSQL database.
void create(const std::string &connInfo)
It creates a new data source.
std::unique_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository.
te::pgis::Connection * getConnection()
ConnectionPool * getConnPool() const
It returns a pointer to the internal connection pool.
#define TEPGISEXPORT
You can use this macro in order to export/import classes and functions from this module.
unsigned int m_geomTypeOid
PostGIS Geometry type OID.
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available in a driver.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
static te::da::SQLDialect * sm_dialect
PostGIS SQL dialect.
A class to store the proxy information that must be used to access data located in URIs.
unsigned int getRasterTypeId() const
It returns the type id associated to the PostGIS Raster type.
bool m_timeIsInteger
It indicates if the postgis stores, internally, time and timestamp as an integer.
ConnectionPool * m_pool
The connection pool.
unsigned int m_rasterTypeOid
PostGIS Raster type OID.
const std::string & getCurrentSchema() const
It returns the current schema associated to the database connection, or NULL, if none is set.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
An abstract class for data providers like a DBMS, Web Services or a regular file.
Proxy configuration file for TerraView (see terraview_config.h).
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
void open()
It opens the connection(s) to the PostgreSQL database server.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS,...
void close()
It closes the data source and clears all the resources used by its internal communication channel.