ANNA Suite  2020b
Multipurpose development suite for Telco applications
InputBind.hpp
Go to the documentation of this file.
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 
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 noexcept(false);
40  void prepare(dbms::Statement*, dbms::Connection*, const int pos) noexcept(false);
41  void release(dbms::Statement*) { a_ociBind = NULL; }
42 
43  void codeFloat(dbms::Data&) const ;
44  void codeShortBlock(dbms::Data&) const ;
45  void codeDate(dbms::Data&) const noexcept(false);
46 
47  static char asCharacter(const char byte)
48  {
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 
Definition: Connection.hpp:38
Definition: Statement.hpp:35
Definition: Statement.hpp:43
Definition: InputBind.hpp:31
Definition: Data.hpp:27
Definition: app.hpp:12
Definition: BaseBind.hpp:36
InputBind(const char *name, dbms::Data &data)
Definition: InputBind.hpp:18