Skip to content

BasesQueryResult

Official

The obsidian#BasesQueryResult contains all of the available information from executing the bases query, applying filters, and evaluating formulas. The data or groupedData should be displayed by your view.

Import:

import { BasesQueryResult } from 'obsidian';

Signature:

export class BasesQueryResult

Constructor

new BasesQueryResult(app: App, config: BasesViewConfig, allProperties: BasesProperty[], data: BasesEntry[])

Constructor.

To get the constructor instance, use getBasesQueryResultConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
dataBasesEntry[]An ungrouped version of the data, with user-configured sort and limit applied. Where appropriate, views should support groupBy by using groupedData instead of this value.

Methods

MethodReturnsDescription
applyLimit(entries)voidTruncates the given entries in place to the configured limit.
applySort(entries)voidSorts the given entries in place according to the configured sort.
getSummaryValue(queryController, entries, prop, summaryKey)ValueApplies a summary function to a single property over a set of entries.

Links to this page: