Skip to main content

Interface: IndexedQuery<TableInfo, IndexFields>

server.IndexedQuery

An interface to define a query over an index.

Queries over indexes must begin by defining an index range with range and then can use the chained methods on Query.

Type parameters

NameType
TableInfoextends GenericTableInfo
IndexFieldsextends GenericIndexFields

Methods

range

range(indexRange): Query<TableInfo>

Define the index range to query.

An index range is a description of which documents Convex should consider when running the query.

The performance of your query is based on the specificity of the index range.

Parameters

NameTypeDescription
indexRange(q: IndexRangeBuilder<DocumentByInfo<TableInfo>, IndexFields, 0>) => IndexRangeAn index range constructed with the supplied IndexRangeBuilder.

Returns

Query<TableInfo>