Type alias ConvexKVStoreConfig<DataModel, TableName, IndexName, KeyFieldName, ValueFieldName, UpsertMutation, LookupQuery, DeleteManyMutation>

ConvexKVStoreConfig<DataModel, TableName, IndexName, KeyFieldName, ValueFieldName, UpsertMutation, LookupQuery, DeleteManyMutation>: {
    ctx: GenericActionCtx<DataModel>;
    deleteMany?: DeleteManyMutation;
    index?: IndexName;
    keyField?: KeyFieldName;
    lookup?: LookupQuery;
    table?: TableName;
    upsert?: UpsertMutation;
    valueField?: ValueFieldName;
}

Type that defines the config required to initialize the ConvexKVStore class. It includes the table name, index name, field name.

Type Parameters

  • DataModel extends GenericDataModel

  • TableName extends TableNamesInDataModel<DataModel>

  • IndexName extends VectorIndexNames<NamedTableInfo<DataModel, TableName>>

  • KeyFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>>

  • ValueFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>>

  • UpsertMutation extends FunctionReference<"mutation", "internal", {
        document: object;
        table: string;
    }>

  • LookupQuery extends FunctionReference<"query", "internal", {
        index: string;
        key: string;
        keyField: string;
        table: string;
    }, object[]>

  • DeleteManyMutation extends FunctionReference<"mutation", "internal", {
        index: string;
        key: string;
        keyField: string;
        table: string;
    }>

Type declaration

  • Readonly ctx: GenericActionCtx<DataModel>
  • Optional Readonly deleteMany?: DeleteManyMutation

    Defaults to internal.langchain.db.deleteMany

  • Optional Readonly index?: IndexName

    Defaults to "byKey"

  • Optional Readonly keyField?: KeyFieldName

    Defaults to "key"

  • Optional Readonly lookup?: LookupQuery

    Defaults to internal.langchain.db.lookup

  • Optional Readonly table?: TableName

    Defaults to "cache"

  • Optional Readonly upsert?: UpsertMutation

    Defaults to internal.langchain.db.upsert

  • Optional Readonly valueField?: ValueFieldName

    Defaults to "value"

Generated using TypeDoc