Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / include / anna / dbms.oracle / OutputBind.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_OutputBind_hpp
10 #define anna_dbms_oracle_OutputBind_hpp
11
12 #include <anna/dbms/OutputBind.hpp>
13
14 #include <anna/dbms.oracle/BaseBind.hpp>
15
16 struct OCIDefine;
17
18 namespace anna {
19
20 namespace dbms {
21
22 class Statement;
23
24 namespace oracle {
25
26 class OutputBind : public dbms::OutputBind,  public BaseBind {
27 public:
28   OutputBind(const char* name, dbms::Data& data);
29   ~OutputBind();
30
31 private:
32   OCIDefine* a_ociDefine;
33
34   void decode() const throw(anna::RuntimeException);
35   void prepare(dbms::Statement*, dbms::Connection*, const int pos) throw(DatabaseException);
36   void release(dbms::Statement*) throw() { a_ociDefine = NULL; }
37
38   void decodeFloat(dbms::Data&) const throw(RuntimeException);
39   void decodeShortBlock(dbms::Data&) const throw(RuntimeException);
40   void decodeLongBlock(dbms::Data&) const throw(RuntimeException);
41   void decodeDate(dbms::Data&) const throw(RuntimeException, DatabaseException);
42
43   void do_write(const dbms::LongBlock&) const throw(RuntimeException, dbms::DatabaseException);
44
45   static unsigned char asByte(const char hex)
46   throw() {
47     return (hex >= '0' && hex <= '9') ? (hex - '0') : ((hex - 'A') + 0x0a);
48   }
49
50   friend class Statement;
51 };
52
53 }
54 }
55 }
56
57 #endif
58