Briyah SDK - v2.0.6
    Preparing search index...

    Interface DataSource

    A host's queryable data.

    execute is only ever called with a query that has already been validated against the named dataset: every field exists, every operator is allowed on it, every enum value is one of the declared ones, and the limit is within the set's cap. A host does not need to re-check any of that, and must not accept a query from anywhere else.

    interface DataSource {
        datasets: DataSet[];
        description?: string;
        name: string;
        execute(query: DataQuery, context: unknown): Promise<DataResult>;
    }
    Index
    datasets: DataSet[]
    description?: string

    Shown at the top of the schema guide.

    name: string

    Identifies the source in logs and in the schema guide's title.

    • Runs one validated query.

      Parameters

      • query: DataQuery

        The validated query

      • context: unknown

        The host's opaque per-invocation context, threaded from sendRoomMessage — where the tenant scoping lives. Never anything the model supplied.

      Returns Promise<DataResult>

      The rows, and the total when it is cheap to know