|
| Blob (const std::vector< uint8_t > &buffer) |
|
std::vector< uint8_t > | read (int64_t offset, int64_t length) override |
|
int64_t | write (int64_t offset, const std::vector< uint8_t > &data) override |
|
int64_t | append (const std::vector< uint8_t > &data) override |
|
int64_t | trim (int64_t newLen) override |
|
int64_t | size () override |
|
const std::vector< uint8_t > & | getBuffer () const |
|
◆ append()
int64_t Blob::append |
( |
const std::vector< uint8_t > & |
data | ) |
|
|
inlineoverridevirtual |
Append the given bytes to the BLOB.
- Parameters
-
The | data to append to the BLOB |
- Returns
- the number of bytes written
Implements ledger::core::api::DatabaseBlob.
◆ read()
std::vector<uint8_t> Blob::read |
( |
int64_t |
offset, |
|
|
int64_t |
length |
|
) |
| |
|
inlineoverridevirtual |
Reads bytes from the blob at the given offset and of the a given length and return them in a byte array.
- Parameters
-
offset | Start to read bytes from the blob at offset value. |
length | Maximum number of byte read from the blob |
Implements ledger::core::api::DatabaseBlob.
◆ size()
◆ trim()
int64_t Blob::trim |
( |
int64_t |
newLen | ) |
|
|
inlineoverridevirtual |
Truncate the BLOB to the length given by the newLen parameter (in bytes).
- Parameters
-
newLen | The final size of the BLOB |
- Returns
- The number of byte truncated
Implements ledger::core::api::DatabaseBlob.
◆ write()
int64_t Blob::write |
( |
int64_t |
offset, |
|
|
const std::vector< uint8_t > & |
data |
|
) |
| |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file:
- test/database/MemoryDatabaseProxy.cpp