Revert "Remove mysql and oracle resources for anna-ericsson project"
[anna.git] / source / dbms / Data.cpp
diff --git a/source/dbms/Data.cpp b/source/dbms/Data.cpp
new file mode 100644 (file)
index 0000000..3e75b0f
--- /dev/null
@@ -0,0 +1,28 @@
+// 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 //
+
+
+#include <anna/core/functions.hpp>
+
+#include <anna/dbms/Data.hpp>
+
+using namespace anna;
+
+std::string dbms::Data::asString() const
+throw() {
+  static const char* typeName [] = { "Integer", "String", "Float", "ShortBlock", "LongBlock", "Date", "TimeStamp" };
+  std::string result("dbms::Data { Type: ");
+  result += typeName [a_type];
+  result += " | Buffer: ";
+  result += functions::asHexString(anna_ptrnumber_cast(a_buffer));
+  result += " | MaxSize: ";
+  result += functions::asString(a_maxSize);
+  result += " | Null: ";
+  result += functions::asString(a_isNull);
+  return result += " }";
+}
+