Skip to main content
Module

x/earthstar_replica_server/deps.ts>Earthstar.Query

An always-online Earthstar peer for your shares.
Latest
interface Earthstar.Query
Re-export
import { type Earthstar } from "https://deno.land/x/earthstar_replica_server@4.0.0-beta.1/deps.ts";
const { Query } = Earthstar;

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