localpocket 0.3.2
localpocket: ^0.3.2 copied to clipboard
Local-first SQLite database for Dart and Flutter with offline-first storage and eventually-consistent PocketBase synchronization.
0.3.2 #
- Native opens now default to durable attachment storage. With no
blobStore,LocalPocket.openinstalls the content-addressedNativeBlobStorerooted beside the database file (<database file name>.blobs, so two databases in one directory never share bytes):files.attachworks without importing anything fromsrc/, and the bytes survive close → reopen. A caller-suppliedblobStorestill wins (and the default root is not even created), and an in-memory database (:memory:) keeps failing typed without an explicit store. NativeBlobStoreis exported from the package barrel, so apps that want a non-default root (one directory per tenant, say) no longer need animplementation_importsignore pinned to an internal path. The export is conditional — a web build still never pullsdart:io.NativeBlobStorecan be passed on every platform without a conditional import: a web open drops it and keeps the worker's own OPFS store (durable either way — only a native filesystem root has no meaning in a browser). Any OTHER supplied store still fails the web open typed, because ignoring it would change a guarantee (aMemoryBlobStorewould silently become durable).- README: the native storage seam now names the concrete store per platform
instead of deferring to "a persistent
BlobStore".
0.3.1 #
- Fixed: a field promoted out of
extracould never be cleared. The migration now removes the promoted key from the blob and every write re-encodesextra, so a stale copy can no longer resurrect the old value afterpatch(field, null)(the read path's NULL-column fallback used to serve it, and the next read-modify-write re-committed it). - README: attachment deduplication is documented as byte-keyed identity —
re-attaching identical bytes to the same record/field returns the stored
reference and ignores the new
name/group, andfieldis the scope that keeps two byte-identical files distinct.
0.3.0 #
- Declaring a field that already lived in
extrano longer loses the value: migrations backfill the new column and a NULL column no longer masks it. - Record ids now accept every shape PocketBase accepts (
[A-Za-z0-9_]{15}). keepUnsyncedArchivesdefaults totrue: archiving a never-synced record no longer hard-deletes it.- Quarantined remote records are visible in
SyncReport.quarantinedandSyncStatus.quarantineErrorinstead of a silently "successful" pull. jsonListrejects element types JSON cannot decode at declaration time.- Added
db.wipe(): drops all local rows, sync bookkeeping, cursors and blob bytes, keeps the database identity, and re-pulls on the next cycle. - Added
FileRef.name/FileRef.group,files.attach(group:),files.list(group:), andWrites.fromJson(store, doc). - Added a default PocketBase sync backend on native, so
attachPocketBaseSync(...).start()works without importing the adapter. - README: watch-limit performance warning,
toJson()versus the pushed payload,pulledsemantics, attachment name/group semantics, quarantine visibility, anddb.wipe().
0.2.0 #
- major refactors, prepearing for release
0.1.1 #
- Using sqlite3 instead of sqflite
- Added dedicated-worker web support with OPFS/IndexedDB storage, compiled query plans, browser smoke coverage, FTS5, files, field encryption, and conflicts bridges.
- Added unified release validation through
tool/release.dart. - Documented current web limits: TRUNCATE journaling, SQLCipher exclusion,
single-tab sync, unsupported dedicated-worker
:memory:mode, and the distinction between Playwright WebKit and real Safari.
0.1.0 #
- Initial release of localpocket.