Interface SupportedQuery<QueryType>

interface SupportedQuery<
    QueryType extends BaseQueryFormat["type"] = BaseQueryFormat["type"],
> {
    asciiSummarizer: (
        formatter: OutputFormatter,
        analyzer: FlowrAnalysisProvider,
        queryResults: BaseQueryResult,
        resultStrings: string[],
        query: readonly Query[],
    ) => AsyncOrSync<boolean>;
    completer?: (
        splitLine: readonly string[],
        config: FlowrConfigOptions,
    ) => string[];
    executor: QueryExecutor<
        QueryArgumentsWithType<QueryType>,
        Promise<BaseQueryResult>,
    >;
    flattenInvolvedNodes: (
        queryResults: BaseQueryResult,
        query: readonly Query[],
    ) => NodeId[];
    fromLine?: (
        splitLine: readonly string[],
        config: FlowrConfigOptions,
    ) => undefined | Query | Query[];
    schema: ObjectSchema;
}

Type Parameters

Properties

asciiSummarizer: (
    formatter: OutputFormatter,
    analyzer: FlowrAnalysisProvider,
    queryResults: BaseQueryResult,
    resultStrings: string[],
    query: readonly Query[],
) => AsyncOrSync<boolean>
completer?: (
    splitLine: readonly string[],
    config: FlowrConfigOptions,
) => string[]

optional completion in, e.g., the repl

executor: QueryExecutor<
    QueryArgumentsWithType<QueryType>,
    Promise<BaseQueryResult>,
>
flattenInvolvedNodes: (
    queryResults: BaseQueryResult,
    query: readonly Query[],
) => NodeId[]

Flattens the involved query nodes to be added to a flowR search when the fromQuery function is used based on the given result after this query is executed. If this query does not involve any nodes, an empty array can be returned.

fromLine?: (
    splitLine: readonly string[],
    config: FlowrConfigOptions,
) => undefined | Query | Query[]

optional query construction from an, e.g., repl line

schema: ObjectSchema