Skip to content

DataviewCandidateRetriever

The DataviewCandidateRetriever class manages the retrieval of candidate information from Dataview. It provides methods to retrieve source information and file contents based on the provided DQL query.

Implements

  • CandidateRetriever

Methods

getSourceInfo()

getSourceInfo(dql): Promise<any[]>

Retrieves the source information based on the provided DQL query. It queries the DQL and retrieves the paths from the results. It then retrieves the files based on the paths and returns an array of objects containing the file paths.

Parameters

ParameterTypeDescription
dqlstring[]The DQL query to retrieve the source information.

Returns

A Promise that resolves to an array of objects containing the file paths.

Source

source/retrieve/DataviewCandidateRetriever.ts:32


retrieve()

retrieve(parameters): Promise<FileContents[]>

Retrieves file contents. It ensures that duplicate paths are filtered out by creating a Set from the paths array. Each file is then processed to prepare its contents according to the specified strategy The resulting array of FileContents is flattened before being returned.

Parameters

ParameterTypeDescription
parametersStrategyMetadataAn object containing the DQL query, strategy, and optional evergreen status

Returns

A Promise that resolves to an array of FileContents, each representing the contents of a file.

Implementation of

CandidateRetriever.retrieve

Source

source/retrieve/DataviewCandidateRetriever.ts:56


Generated using typedoc-plugin-markdown and TypeDoc