NAME
Net::Blossom::Server::Backend::SQLite::BlobStore - SQLite Blossom blob bytes
DESCRIPTION
This module implements Net::Blossom::Server::BlobStore using SQLite BLOB values. It stores bytes by opaque storage key and contains no descriptor or owner logic.
Use the same DBI handle for the paired Net::Blossom::Server::Backend::SQLite::MetadataStore so their changes share one transaction.
CONSTRUCTOR
new
my $blobs = Net::Blossom::Server::Backend::SQLite::BlobStore->new(
dbh => $dbh,
);
Creates a blob store using a SQLite DBI handle with AutoCommit enabled.
METHODS
dbh
Returns the SQLite DBI handle.
deploy_schema
Creates the blob byte table.
begin_upload
Starts a staged upload implementing the Net::Blossom::Server::BlobStore upload contract. Its prepare method requires an active transaction on dbh; the top-level SQLite backend manages this transaction.
get_blob
Returns bytes by storage key or undef.
get_blob_range
Uses SQLite substr to return the requested zero-based offset and positive length without materializing the complete BLOB in Perl. Returns undef when the storage key is absent. When size is supplied, a range beyond it is rejected.
delete_blob
Deletes bytes by storage key and reports whether they existed. It requires an active transaction on dbh.
BUILDARGS
Validates and normalizes constructor arguments for Class::Tiny.