import { KeyworkCollection } from "https://deno.land/x/keywork@v6.2.1/collections/KeyworkCollection.ts";
Constructors
new
KeyworkCollection(kvNamespace: KVNamespace, collectionPath: string)Type Parameters
ExpectedType extends DeserializationTypes | { }
Properties
protected
__documentsPath: PathBuilderPath to documents.
protected
__indexByDocumentPath: PathBuilderPath to the default document index by document key.
protected
__indexByIDPath: PathBuilderPath to the default document index by ID.
protected
__indexesPath: PathBuilderPath to indexes.
protected
__indexPathByPropertyName: Record<keyof ExpectedType, string | undefined>Path to index listing entries by an entry's properties
protected
__indexPrefixesPath: PathBuilderPath to index prefixes
Methods
protected
fetchIndexPrefixes(): Promise<string[]>addEntryToIndexes<E extends ExpectedType>(entry: E, metadata: KeyworkDocumentMetadata)
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.
fetchDocuments(options?: FetchListOptions): Promise<CollectionDocumentReferencesResponse<ExpectedType>>
Fetches a paginated list of the immediate KeyworkDocumentReference
.
fetchDocumentsList(options?: FetchListOptions)
fetchDocumentsListByID(options?: FetchListOptions)
Fetches a paginated list of the immediate documents within this collection.
query()