rpc_blob_sqlite 2.2.0
rpc_blob_sqlite: ^2.2.0 copied to clipboard
SQLite/SQLCipher storage adapter for rpc_blob, with optionally encrypted databases on VM and Flutter.
2.1.0 #
Changed #
- Requires rpc_dart 5. See its changelog: flow control is on by default, an
expired deadline is now
RpcDeadlineExceededExceptionon every shape, and a stream that ends without a trailer raisesUNAVAILABLE.
2.0.1 #
- The transaction helper no longer buries the error it was called to report.
SQLite aborts the transaction itself for a whole class of failures
(
SQLITE_FULL,SQLITE_IOERR,SQLITE_BUSY), and the unconditionalROLLBACKin the error path then threw "cannot rollback - no transaction is active" over the top of the disk-full or IO error underneath — which is what reached the user instead of the cause. Rolled back only while a transaction is actually open, and the cleanup can no longer throw over the original. Same defectrpc_data_sqlitefixed in its own helper; this second copy was missed, and it sits on every blob write, delete and cache sweep.
2.0.0 #
- Implements
ensureCollection,deleteManyandheadManyfrom therpc_blob2.0.0 interface. Both batch operations run one statement per chunk, sized under SQLite's bound-variable ceiling, instead of one statement per id;deleteManyusesRETURNINGso callers get per-id truth rather than a count they would have to guess against. collectionSizereturnsFuture<int?>; this backend still answers a number.
1.0.1 #
- Web (dart2js / Wasm) path correctness. Verified the injected-
CommonDatabaseadapter surface (SqliteBlobRepository.db) imports onlypackage:sqlite3/common.dart(Wasm-compatible);dart:io,dart:ffiandpackage:sqlite3/sqlite3.dart(FFI) stay confined to theif (dart.library.io)loader files and never leak onto the web import chain. The.memory()/.file()convenience factories go through the conditional loader whose web stub throwsUnsupportedError(web apps inject their ownsqlite3mc-on-Wasm db). The adapter'sasync*generators (_chunkedPayload, read/list streams) areawait-first / yield-only over already-materialized bytes, so there is noyield-before-await forcancel-deadlock on dart2js. The1 << 32random-seed pattern exists only in the io-only loader (VM-only) and is not web-reachable. Added a JS compile smoke test (test/web_smoke_test.dart,dart test -p node) proving the web-facing API compiles to JS clean. Full Wasm db execution still requires the app to supplysqlite3mc.wasm.
1.0.5 #
- Allow to pass raw sqlite db connection to adapter
1.0.4 #
- S3 adapter now auto-detects public buckets and returns plain download URLs when anonymous
s3:GetObjectis allowed; presigning is used only for private buckets, still honoringpresign*host overrides.
1.0.3 #
- Added presign-only endpoint overrides (
presignEndpoint/presignPort/presignUseSSL/presignPathStyle) for S3/MinIO to sign links on a public host behind a reverse proxy; removeddownloadUrlMapperto avoid generating invalid signatures.
1.0.2 #
- S3 adapter can rewrite presigned download URLs via
S3BlobStorageOptions.downloadUrlMapper(useful for serving through a proxy/CDN) and configure presign TTL viaS3BlobStorageOptions.presignTtlSeconds; constructor params consolidated intoS3BlobStorageOptions.
1.0.1 #
- S3 adapter now fetches object tags (
?tagging) and merges them intoBlobDescriptor.metadatawithout overwriting metadata provided on upload. - Added
xmldependency to parse S3 tag responses.
1.0.0 #
- Added
S3BlobStorageAdapter(S3/MinIO/Ceph-compatible) storing blobs under<prefix><collection>/<id>with metadata-based versioning and optimistic checks. - New
S3BlobStorageAdapter.connect(...)helper for quick setup; list/Head/read/write/delete/listCollections wired to S3 operations; descriptors include a presigned download URL. - README now documents S3/MinIO usage; pubspec updated with the MinIO client dependency.
- Initial version.