BlobStream¶
- class dsviper.BlobStream¶
Bases:
objectThe handle on a blob being written to a database past 2 GB, in chunks.
It reports where the write stands - offset, remaining, is_closed - and its blob_id once the last byte is in. It moves nothing itself. The three CommitDatabase methods blob_stream_create, blob_stream_append and blob_stream_close do the writing.
Note: Not directly instantiable.
- blob_id() ValueBlobId¶
Return the ValueBlobId of the written blob.
It is computed from the blob’s layout and every byte appended. Raise while the stream is open: the hash is only complete once every byte has been written.
- is_closed() bool¶
Return True if the stream is closed.
- offset() int¶
Return the current offset.
- remaining() int¶
Return the remaining bytes count to fill the blob.