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
ConnectionQtOracle.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_CONNECTION_QT_CONNECTIONQTORACLE_HPP_INCLUDED
5 #define FIRE_CONNECTION_QT_CONNECTIONQTORACLE_HPP_INCLUDED
6 
7 #include <string>
8 #include <exception>
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 ConnectionQtOracle : public ConnectionQtSql {
30  public:
34  static std::string const NAMESPACE();
35 
37  virtual ~ConnectionQtOracle();
38 
39  virtual std::string getNamespace() const;
40  virtual void eraseTable(const std::string& schema, const std::string& tbl, const source::vector::VectorLayerType::VectorLayerType vlt);
41  virtual source::vector::Metadata::MetadataShp buildMetadata(const std::string & tblName, const std::string & schemaName) const;
42 
43  // sezione da spostare sul QueryBuilder
44  virtual const std::string _getCreationFieldSql(const source::vector::Field::FieldShp& fld) const;
45  virtual const std::string _getSpatialIndexCreationSql(const std::string& schema, const std::string &tbl, const source::vector::Field::FieldShp& fld) const;
46  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;
47  virtual const std::string _getPkSql(const std::string& tbl, const source::vector::Metadata::MetadataShp& mtd) const;
48  virtual const std::string _getSaveFieldSql(const std::string& paramName, const source::vector::Field::FieldShp& fld) const;
49  virtual source::vector::DataValue::DataValueShp _getSaveValueSql(const source::vector::DataValue::DataValueShp& value) const;
50  // end
51 
57  virtual void resetFromNative(OCIEnv* env, OCISvcCtx* ctx);
58 
59  protected:
60  virtual void _openNoWait();
61  virtual std::string const _getTestSql() const;
62  virtual std::string const _getQtDriverName() const;
63  virtual bool _isGeometryNativeType(const int &id) const;
64  virtual bool _isGeographyNativeType(const int &id) const;
65  virtual const std::string _getBuff2GeomSql(const bool& useWkb) const;
66  virtual std::string const _getLayersSql(const std::string & schema, const std::string & tbl) const;
67  virtual std::string _getSridSql(const std::string & tblName, const std::string & schemaName, const std::string & geomFld) const;
68  virtual std::string const _getLayerExtentSql(const std::string & tblName, const std::string & schemaName, const std::string & geomFld) const;
69 
70  private:
71  static const int MAX_PRECISION;
72  static const int MAX_SCALE;
73  static const std::string TRUE_VALUE;
74  static const std::string FALSE_VALUE;
75 
76  static std::string const _SQL_TEST;
77  static std::string const _QT_DRIVER_NAME;
78 
79  source::vector::FieldType::FieldType _ora2Fire(const std::string& dbId, const int&sc) const;
80 };
81 
82 } // namespace qt
83 } // namespace connection
84 } // namespace fire
85 
86 #endif
Definition: EnvelopeSh.hpp:18
Definition: FieldSh.hpp:21
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 OracleSpatial. Per la connessione รจ prevista u...
Definition: ConnectionQtOracle.hpp:29
paramName
Definition: Connection.hpp:39
Definition: DataValueSh.hpp:24