Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
ConnectionQtPostgres.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_CONNECTION_QT_CONNECTIONQTPOSTGRES_HPP_INCLUDED
5 #define FIRE_CONNECTION_QT_CONNECTIONQTPOSTGRES_HPP_INCLUDED
6 
7 #include <exception>
8 #include <string>
9 
10 #include "fire/plugin-impl/export.hpp"
11 #include "fire/plugin-impl/connection/qt/ConnectionQtSql.hpp"
12 
13 namespace fire {
14 namespace connection {
15 namespace qt {
16 
29 class FIRE_PLUGIN_DLL ConnectionQtPostgres : public ConnectionQtSql {
30  public:
34  static std::string const NAMESPACE();
35 
40 
44  virtual ~ConnectionQtPostgres();
45 
46  virtual std::string getNamespace() const;
47  virtual void eraseTable(const std::string& schema, const std::string& tbl, const source::vector::VectorLayerType::VectorLayerType vlt);
48  virtual source::vector::Metadata::MetadataShp buildMetadata(const std::string & tblName, const std::string & schemaName) const;
49 
50  protected:
51  virtual std::string const _getTestSql() const;
52  virtual std::string const _getQtDriverName() const;
53  virtual bool _isGeometryNativeType(const int &id) const;
54  virtual bool _isGeographyNativeType(const int &id) const;
55  virtual std::string const _getBuff2GeomSql(const bool& useWkb) const;
56  virtual std::string const _getLayersSql(const std::string & schema, const std::string & tblName) const;
57  virtual std::string _getSridSql(const std::string & tblName, const std::string & schemaName, const std::string & geomFld) const;
58  virtual std::string const _getLayerExtentSql(const std::string & tblName, const std::string & schemaName, const std::string & geomFld) const;
59 
60  // sezione da spostare sul QueryBuilder
61  virtual const std::string _getCreationFieldSql(const source::vector::Field::FieldShp& fld) const;
62  virtual const std::string _getSpatialIndexCreationSql(const std::string& schema, const std::string &tbl, const source::vector::Field::FieldShp& fld) const;
63  virtual const std::string _getCatalogInsertSql(const std::string &schema, const std::string& tbl, const source::vector::Field::FieldShp& fld, const gear::geom::Envelope::EnvelopeShp& extent) const;
64  virtual const std::string _getPkSql(const std::string& tbl, const source::vector::Metadata::MetadataShp& mtd) const;
65  virtual const std::string _getSaveFieldSql(const std::string& paramName, const source::vector::Field::FieldShp& fld) const;
66  virtual source::vector::DataValue::DataValueShp _getSaveValueSql(const source::vector::DataValue::DataValueShp& value) const;
67  // end
68 
69  source::vector::FieldType::FieldType _pg2Fire(const std::string &id) const;
70  gear::geom::GeometryType::GeometryType _pgGeom2Fire(const std::string& type) const;
71 
72  private:
73  static const std::string _SQL_TEST;
74  static std::string const _QT_DRIVER_NAME;
75 };
76 
77 } // namespace qt
78 } // namespace connection
79 } // namespace fire
80 
81 #endif
Definition: EnvelopeSh.hpp:18
Definition: FieldSh.hpp:21
GeometryType
Definition: GeometryType.hpp:43
Implementazione Connection per l'accesso a banche dati spaziali basato su QtSql.
Definition: ConnectionQtSql.hpp:35
Definition: MetadataSh.hpp:22
Implementazione Connection per l'accesso a banche dati PostGis. Per la connessione è prevista una istan...
Definition: ConnectionQtPostgres.hpp:29
paramName
Definition: Connection.hpp:39
Definition: DataValueSh.hpp:24