Revert "Remove mysql and oracle resources for anna-ericsson project"
[anna.git] / include / anna / dbms.mysql / BaseBind.hpp
diff --git a/include/anna/dbms.mysql/BaseBind.hpp b/include/anna/dbms.mysql/BaseBind.hpp
new file mode 100644 (file)
index 0000000..a9a3b85
--- /dev/null
@@ -0,0 +1,53 @@
+// ANNA - Anna is Not Nothingness Anymore                                                         //
+//                                                                                                //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
+//                                                                                                //
+// See project site at http://redmine.teslayout.com/projects/anna-suite                           //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
+
+
+#ifndef anna_dbms_mysql_BaseBind_hpp
+#define anna_dbms_mysql_BaseBind_hpp
+
+#include <anna/dbms/Data.hpp>
+
+#include <anna/dbms.mysql/forward.hpp>
+
+namespace anna {
+
+namespace dbms {
+
+namespace mysql {
+
+class BaseBind {
+public:
+  virtual ~BaseBind();
+
+protected:
+  /*
+   * mysql.h:typedef char my_bool;
+   */
+  char a_nullIndicator;
+
+  /**
+   * mysql_time.h: typedef st_mysql_time MYSQL_TIME
+   */
+  st_mysql_time* a_time;
+
+  unsigned long a_length;
+
+  BaseBind(const dbms::Data& data) ;
+  void setupBind(st_mysql_bind&, dbms::Data&) throw(RuntimeException);
+
+private:
+  static const int MaxBlobSize = 2 << 16;
+
+  const Data::Type::_v a_type;
+};
+
+}
+}
+}
+
+#endif
+