Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/query/query-types.ts>Query

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
interface Query
import { type Query } from "https://deno.land/x/earthstar@v10.0.0-alpha.4/src/query/query-types.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