comparison Framework/PostgreSQL/PostgreSQLResult.h @ 246:483af3f35a4b

turning ResultFileValue into a base class, and implement its primitives for PostgreSQL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Apr 2021 08:42:31 +0200
parents 3236894320d6
children 16aac0287485
comparison
equal deleted inserted replaced
245:9d00e5e073e8 246:483af3f35a4b
30 namespace OrthancDatabases 30 namespace OrthancDatabases
31 { 31 {
32 class PostgreSQLResult : public boost::noncopyable 32 class PostgreSQLResult : public boost::noncopyable
33 { 33 {
34 private: 34 private:
35 class LargeObjectResult;
36
35 void *result_; /* Object of type "PGresult*" */ 37 void *result_; /* Object of type "PGresult*" */
36 int position_; 38 int position_;
37 PostgreSQLDatabase& database_; 39 PostgreSQLDatabase& database_;
38 unsigned int columnsCount_; 40 unsigned int columnsCount_;
39 41
68 70
69 int64_t GetInteger64(unsigned int column) const; 71 int64_t GetInteger64(unsigned int column) const;
70 72
71 std::string GetString(unsigned int column) const; 73 std::string GetString(unsigned int column) const;
72 74
73 void GetLargeObject(std::string& result, 75 std::string GetLargeObjectOid(unsigned int column) const;
74 unsigned int column) const;
75 76
76 void GetLargeObject(void*& result, 77 void GetLargeObjectContent(std::string& content,
77 size_t& size, 78 unsigned int column) const;
78 unsigned int column) const;
79 79
80 IValue* GetValue(unsigned int column) const; 80 IValue* GetValue(unsigned int column) const;
81 }; 81 };
82 } 82 }