Mercurial > hg > orthanc-databases
diff Framework/PostgreSQL/PostgreSQLLargeObject.h @ 248:7a4f9bcb0bc2
PostgreSQL: Support of range reads from the storage area
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Apr 2021 09:46:44 +0200 |
parents | 3236894320d6 |
children | 16aac0287485 |
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLLargeObject.h Wed Apr 14 09:18:20 2021 +0200 +++ b/Framework/PostgreSQL/PostgreSQLLargeObject.h Wed Apr 14 09:46:44 2021 +0200 @@ -45,23 +45,21 @@ size_t size); public: - PostgreSQLLargeObject(PostgreSQLDatabase& database, - const void* data, - size_t size); - + // This constructor is used to deal with "InputFileValue" PostgreSQLLargeObject(PostgreSQLDatabase& database, const std::string& s); std::string GetOid() const; - static void Read(std::string& target, - PostgreSQLDatabase& database, - const std::string& oid); + static void ReadWhole(std::string& target, + PostgreSQLDatabase& database, + const std::string& oid); - static void Read(void*& target, - size_t& size, - PostgreSQLDatabase& database, - const std::string& oid); + static void ReadRange(std::string& target, + PostgreSQLDatabase& database, + const std::string& oid, + uint64_t start, + size_t size); static void Delete(PostgreSQLDatabase& database, const std::string& oid);