Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / include / anna / dbms.oracle / BaseBind.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #ifndef anna_dbms_oracle_BaseBind_hpp
10 #define anna_dbms_oracle_BaseBind_hpp
11
12 struct OCIEnv;
13 struct OCIError;
14 struct OCIBind;
15 struct OCILobLocator;
16 struct OCISvcCtx;
17 struct OCIDateTime;
18
19 #include <anna/dbms.oracle/Descriptor.hpp>
20
21 namespace anna {
22
23 class DataBlock;
24
25 namespace dbms {
26
27 class Statement;
28 class Data;
29
30 namespace oracle {
31
32 class Statement;
33 class Database;
34 class Connection;
35
36 class BaseBind {
37 public:
38   virtual ~BaseBind();
39
40 protected:
41   /**
42    * NĂºmero de bytes reservados para un Float cuando se trata como si fuera una cadena.
43    */
44   static const int FloatSize = 63;
45   struct oci_param {
46     int type;
47     int maxLength;
48     short unsigned int* length;
49     void* buffer;
50   };
51   struct Blob : public Descriptor {
52     OCILobLocator* handle;
53     Blob() : Descriptor((dvoid**) &handle) {;}
54   };
55   struct DateTime : public Descriptor {
56     OCIDateTime* handle;
57     DateTime() : Descriptor((dvoid**) &handle) {;}
58   };
59
60   short a_nullIndicator;
61   unsigned short a_length;
62   anna::DataBlock* a_ofb; // Oracle Formatted Buffer.
63   Blob a_blob;
64   DateTime a_datetime;
65
66   BaseBind(const dbms::Data& data) ;
67
68   oci_param getOCIParam(Database&, Connection*, dbms::Data&) throw(RuntimeException);
69
70 private:
71   const Data::Type::_v a_type;
72 };
73
74 }
75 }
76 }
77
78 #endif
79