@kognitivedev/storage
v0.2.8
Published
Multi-backend storage abstraction for the Kognitive platform
Maintainers
Readme
@kognitivedev/storage
Multi-backend storage abstraction with InMemory and Composite implementations.
Installation
bun add @kognitivedev/storageQuick Start
import { InMemoryStorageBackend, CompositeStorage } from "@kognitivedev/storage";
const store = new InMemoryStorageBackend();
const record = await store.create("users", { name: "Alice" });
const found = await store.get("users", record.id);
const list = await store.list("users", { where: { name: "Alice" } });StorageBackend Interface
get(), list(), create(), update(), delete(), transaction(), capabilities()
Implementations
- InMemoryStorageBackend — Map-based, for development/testing
- CompositeStorage — routes different collections to different backends
