Skip to main content
Module

x/earthstar/mod.ts>Query

Storage for private, distributed, offline-first applications.
Latest
interface Query
Re-export
import { type Query } from "https://deno.land/x/earthstar@v10.2.2/mod.ts";

Describes a query for fetching documents from a replica.

Type Parameters

FormatsType extends FormatName[]

Properties

optional
historyMode: HistoryMode

Whether to fetch all historical versions of a document or just the latest versions.

optional
orderBy:
| "path ASC"
| "path DESC"
| "localIndex ASC"
| "localIndex DESC"

The order to return docs in. Defaults to path ASC.

optional
startAfter: { localIndex?: number; path?: string; }

Only fetch documents which come after a certain point.

optional
filter: QueryFilter
optional
limit: number

The maximum number of documents to return.

optional
formats: FormatsType