import { CollectionBuilder } from "https://deno.land/x/kvdex@v0.3.0/mod.ts";
Builder object for building new collections of documents.
Properties
private
kv: Deno.KvMethods
private
checkCollectionKey(collectionKey: KvKey)collection<T extends KvValue>(collectionKey: KvKey)
Create a standard collection of data adhering to the type KvValue. Can be of primitives, like strings and numbers, or arrays and objects.
Example:
builder.collection<string>(["strings"])
indexableCollection<T extends Model>(collectionKey: KvKey)
Create an indexable collection of data adhering to the type Model. Restricted to object types.
Example:
builder.indexableCollection<User>(["users"], {
username: "primary",
age: "secondary"
})