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

  • Readonlyctx: GenericActionCtx<DataModel>
  • Optional ReadonlydeleteMany?: DeleteManyMutation

    Defaults to internal.langchain.db.deleteMany

  • Optional Readonlyindex?: IndexName

    Defaults to "byKey"

  • Optional ReadonlykeyField?: KeyFieldName

    Defaults to "key"

  • Optional Readonlylookup?: LookupQuery

    Defaults to internal.langchain.db.lookup

  • Optional Readonlytable?: TableName

    Defaults to "cache"

  • Optional Readonlyupsert?: UpsertMutation

    Defaults to internal.langchain.db.upsert

  • Optional ReadonlyvalueField?: ValueFieldName

    Defaults to "value"

""