drive
@noy-db/to-drive·pnpm add @noy-db/to-driveThe whole vault as a single Google Drive file.
| Shape | bundle |
| Atomic CAS | n/a |
| Locality | cloud |
| Speed | slow |
| Persistence | durable |
What it does
Stores the whole vault as a single .noydb bundle, named by ULID (never the vault
name) and placed in Drive's hidden appDataFolder by default — opaque filenames
never leak what the vault is about. Driver-agnostic: bring your own OAuth'd Drive
client.
Notes
- Bundle-only (
NoydbPodStore), not the six-methodNoydbStorecontract — wrap it withwrapPodStore()from@noy-db/hubto get the standard record-level surface. casAtomic: n/a — whole-vault file, no per-record CAS.- Factory:
toDrive(options: DriveStoreOptions).
Store-locator descriptor
See store-locator descriptors for the general model.
kind: 'drive', class: 'cloud'. address is { parentId? } — omitted
means Drive's appDataFolder, the store's existing default. options is { suffix? } (bundle filename suffix, default '.noydb'). binding.client is
required (a DriveClient) — this store has no client library of its
own; binding.handles? carries the per-device HandleStore, omitted leaves
the in-memory default. Because toDrive() returns a NoydbPodStore, its
factory's return type is deliberately unnarrowed and registers via a
documented as unknown as StoreFactory cast.
import { driveStoreDescriptor, registerDriveStore } from '@noy-db/to-drive'
const descriptor = driveStoreDescriptor({ parentId: 'root-folder-id' })