type CollectionStatus = "idle" | "loading" | "initialCommit" | "ready" | "error" | "cleaned-up";
type CollectionStatus = "idle" | "loading" | "initialCommit" | "ready" | "error" | "cleaned-up";
Defined in: packages/db/src/types.ts:335
Collection status values for lifecycle management
// Check collection status
if (collection.status === "loading") {
console.log("Collection is loading initial data")
} else if (collection.status === "ready") {
console.log("Collection is ready for use")
}
// Check collection status
if (collection.status === "loading") {
console.log("Collection is loading initial data")
} else if (collection.status === "ready") {
console.log("Collection is ready for use")
}
// Status transitions
// idle → loading → initialCommit → ready
// Any status can transition to → error or cleaned-up
// Status transitions
// idle → loading → initialCommit → ready
// Any status can transition to → error or cleaned-up