MySQLResultSet.h 2.4 KB

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