Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / include / anna / dbms.oracle / InputBind.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_InputBind_hpp
10 #define anna_dbms_oracle_InputBind_hpp
11
12 #include <anna/dbms/InputBind.hpp>
13
14 #include <anna/dbms.oracle/BaseBind.hpp>
15
16 struct OCIBind;
17
18 namespace anna {
19
20 class DataBlock;
21
22 namespace dbms {
23
24 class Data;
25 class Statement;
26
27 namespace oracle {
28
29 class Statement;
30
31 class InputBind : public dbms::InputBind, public  BaseBind {
32 public:
33   InputBind(const char* name, dbms::Data& data);
34   virtual ~InputBind();
35
36 private:
37   OCIBind* a_ociBind;
38
39   void code() const throw(RuntimeException);
40   void prepare(dbms::Statement*, dbms::Connection*, const int pos) throw(RuntimeException, DatabaseException);
41   void release(dbms::Statement*) throw() { a_ociBind = NULL; }
42
43   void codeFloat(dbms::Data&) const throw();
44   void codeShortBlock(dbms::Data&) const throw();
45   void codeDate(dbms::Data&) const throw(RuntimeException, DatabaseException);
46
47   static char asCharacter(const char byte)
48   throw() {
49     return (byte >= 0 && byte <= 9) ? (byte + '0') : ((byte - 0xa) + 'A');
50   }
51
52   friend class oracle::Statement;
53 };
54
55 }
56 }
57 }
58
59 #endif
60