Mercurial > hg > orthanc-databases
comparison Framework/PostgreSQL/PostgreSQLResult.cpp @ 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 | 483af3f35a4b |
children | 16aac0287485 |
comparison
equal
deleted
inserted
replaced
247:e57a5313ffe5 | 248:7a4f9bcb0bc2 |
---|---|
189 | 189 |
190 | 190 |
191 void PostgreSQLResult::GetLargeObjectContent(std::string& content, | 191 void PostgreSQLResult::GetLargeObjectContent(std::string& content, |
192 unsigned int column) const | 192 unsigned int column) const |
193 { | 193 { |
194 PostgreSQLLargeObject::Read(content, database_, GetLargeObjectOid(column)); | 194 PostgreSQLLargeObject::ReadWhole(content, database_, GetLargeObjectOid(column)); |
195 } | 195 } |
196 | 196 |
197 | 197 |
198 class PostgreSQLResult::LargeObjectResult : public ResultFileValue | 198 class PostgreSQLResult::LargeObjectResult : public ResultFileValue |
199 { | 199 { |
209 { | 209 { |
210 } | 210 } |
211 | 211 |
212 virtual void ReadWhole(std::string& target) const ORTHANC_OVERRIDE | 212 virtual void ReadWhole(std::string& target) const ORTHANC_OVERRIDE |
213 { | 213 { |
214 PostgreSQLLargeObject::Read(target, database_, oid_); | 214 PostgreSQLLargeObject::ReadWhole(target, database_, oid_); |
215 | |
216 } | 215 } |
217 | 216 |
218 virtual void ReadRange(std::string& target, | 217 virtual void ReadRange(std::string& target, |
219 uint64_t start, | 218 uint64_t start, |
220 size_t length) const ORTHANC_OVERRIDE | 219 size_t length) const ORTHANC_OVERRIDE |
221 { | 220 { |
222 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | 221 PostgreSQLLargeObject::ReadRange(target, database_, oid_, start, length); |
223 } | 222 } |
224 }; | 223 }; |
225 | 224 |
226 | 225 |
227 IValue* PostgreSQLResult::GetValue(unsigned int column) const | 226 IValue* PostgreSQLResult::GetValue(unsigned int column) const |