MySQLResultSetImpl.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef MYSQL_MYSQLRESULTSETIMPL_H
  2. #define MYSQL_MYSQLRESULTSETIMPL_H
  3. #include "MySQLResultSetMetaDataImpl.h"
  4. #include <cppconn/resultset.h>
  5. #include <stdint.h>
  6. #include <memory>
  7. #include <string>
  8. namespace MySQL {
  9. class MySQLResultSetImpl
  10. {
  11. public:
  12. MySQLResultSetImpl();
  13. explicit MySQLResultSetImpl(const std::shared_ptr<sql::ResultSet>& pResultSet);
  14. ~MySQLResultSetImpl();
  15. public:
  16. bool Absolute(int row);
  17. void AfterLast();
  18. void BeforeFirst();
  19. void CancelRowUpdates();
  20. void ClearWarnings();
  21. void Close();
  22. uint32_t FindColumn(const std::string& columnLabel) const;
  23. bool First();
  24. std::istream* Blob(uint32_t columnIndex) const;
  25. std::istream* Blob(const std::string& columnLabel) const;
  26. bool Boolean(uint32_t columnIndex) const;
  27. bool Boolean(const std::string& columnLabel) const;
  28. int Concurrency();
  29. std::string CursorName();
  30. long double Double(uint32_t columnIndex) const;
  31. long double Double(const std::string& columnLabel) const;
  32. int FetchDirection();
  33. size_t FetchSize();
  34. int Holdability();
  35. int32_t Int(uint32_t columnIndex) const;
  36. int32_t Int(const std::string& columnLabel) const;
  37. uint32_t UInt(uint32_t columnIndex) const;
  38. uint32_t UInt(const std::string& columnLabel) const;
  39. int64_t Int64(uint32_t columnIndex) const;
  40. int64_t Int64(const std::string& columnLabel) const;
  41. uint64_t UInt64(uint32_t columnIndex) const;
  42. uint64_t UInt64(const std::string& columnLabel) const;
  43. std::shared_ptr<MySQLResultSetMetaDataImpl> MetaData() const;
  44. size_t Row() const;
  45. //RowID* RowId(uint32_t columnIndex);
  46. //RowID* RowId(const std::string & columnLabel);
  47. //const Statement* Statement() const;
  48. std::string String(uint32_t columnIndex) const;
  49. std::string String(const std::string& columnLabel) const;
  50. //enum_type Type() const;
  51. void Warnings();
  52. void InsertRow();
  53. bool IsAfterLast() const;
  54. bool IsBeforeFirst() const;
  55. bool IsClosed() const;
  56. bool IsFirst() const;
  57. bool IsLast() const;
  58. bool IsNull(uint32_t columnIndex) const;
  59. bool IsNull(const std::string& columnLabel) const;
  60. bool Last();
  61. bool Next();
  62. void MoveToCurrentRow();
  63. void MoveToInsertRow();
  64. bool Previous();
  65. void RefreshRow();
  66. bool Relative(int rows);
  67. bool RowDeleted();
  68. bool RowInserted();
  69. bool RowUpdated();
  70. void FetchSize(size_t rows);
  71. size_t RowsCount() const;
  72. bool WasNull() const;
  73. private:
  74. std::shared_ptr<sql::ResultSet> m_pResultSet;
  75. };
  76. } // namespace MySQL
  77. #endif // MYSQL_MYSQLRESULTSETIMPL_H