SQLiteBlob๏
Inherits: RefCounted < Object
Provides incremental read and write access to a BLOB field.
Description๏
Represents a handle to a binary large object (BLOB) stored in a database.
This class allows efficient partial reading and writing of large binary data without loading the entire value into memory.
Methods๏
void |
close() |
get_size() const |
|
read_chunk(offset: int, length: int) |
|
write_chunk(offset: int, buffer: PackedByteArray) |
Method Descriptions๏
void close() ๐
Closes the BLOB handle and releases any associated resources.
The object should not be used after calling this method.
Returns the total size of the BLOB in bytes.
PackedByteArray read_chunk(offset: int, length: int) ๐
Reads a portion of the BLOB starting at offset and spanning length bytes.
Returns the read data as a PackedByteArray.
If the requested range exceeds the BLOB size, only the available data is returned.
bool write_chunk(offset: int, buffer: PackedByteArray) ๐
Writes the contents of buffer into the BLOB starting at offset.
Returns true if the write operation succeeds.
Writing beyond the current BLOB size is not allowed.