szaszm commented on a change in pull request #1073:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1073#discussion_r644746011



##########
File path: extensions/sql/data/DatabaseConnectors.h
##########
@@ -20,72 +20,68 @@
 
 #include <memory>
 #include <string>
-
-#include <soci/soci.h>
-
-#include "Utils.h"
+#include <vector>
+#include <ctime>
 
 namespace org {
 namespace apache {
 namespace nifi {
 namespace minifi {
 namespace sql {
 
-/**
- * We do not intend to create an abstract facade here. We know that SOCI is 
the underlying
- * SQL library. We only wish to abstract ODBC specific information
- */
+enum class DataType {
+  STRING,
+  DOUBLE,
+  INTEGER,
+  LONG_LONG,
+  UNSIGNED_LONG_LONG,
+  DATE
+};
 
-class Statement {
+class Row {
  public:
+  virtual ~Row() = default;
+  virtual std::size_t size() const = 0;
+  virtual std::string getColumnName(std::size_t index) const = 0;
+  virtual bool isNull(std::size_t index) const = 0;
+  virtual DataType getDataType(std::size_t index) const = 0;
+  virtual std::string getString(std::size_t index) const = 0;
+  virtual double getDouble(std::size_t index) const = 0;
+  virtual int getInteger(std::size_t index) const = 0;
+  virtual long long getLongLong(std::size_t index) const = 0;
+  virtual unsigned long long getUnsignedLongLong(std::size_t index) const = 0;
+  virtual std::tm getDate(std::size_t index) const = 0;

Review comment:
       This could be a `std::chrono::time_point` or if you only need the date 
part, then `date::year_month_day`. These types are easier to work with.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to