Skip to main content
Module

x/keywork/collections/mod.ts>KeyworkCollection

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Go to Latest
class KeyworkCollection
Re-export
import { KeyworkCollection } from "https://deno.land/x/keywork@v6.0.1/collections/mod.ts";

Constructors

new
KeyworkCollection(kvNamespace: KVNamespace, collectionPath: string)

Type Parameters

ExpectedType extends DeserializationTypes | { }

Properties

protected
__documentsPath: PathBuilder

Path to documents.

protected
__indexByDocumentPath: PathBuilder

Path to the default document index by document key.

protected
__indexByIDPath: PathBuilder

Path to the default document index by ID.

protected
__indexesPath: PathBuilder

Path to indexes.

protected
__indexPathByPropertyName: Record<keyof ExpectedType, string | undefined>

Path to index listing entries by an entry's properties

protected
__indexPrefixesPath: PathBuilder

Path to index prefixes

Methods

protected
fetchIndexPrefixes(): Promise<string[]>
createDocumentReference(relativeDocPath: string)

Create a KeyworkDocumentReference instance that refers to the document at the specified relative path.

fetchDocumentMetadataByPath(relativeDocPath: string): Promise<null | KeyworkDocumentMetadata>

Fetches a given document's metadata. This is used to determine a document's deserialization ahead of its fetching.

Fetches a paginated list of the immediate KeyworkDocumentReference.

Fetches a paginated list of the immediate documents within this collection.