Interface Query<_T>

Protocol-neutral query intent. Source.query() adapters translate this into a QueryFeaturesRequest, MapLayerQueryRequest, OgcItemsRequest, or the corresponding WFS / OData request.

spatialFilter is a SpatialFilter produced by the spatial-filter builders (envelope, point, polygon, bufferEnvelope, …), not an inline literal.

import { envelope } from "@honua/sdk-js";

const query: Query = {
where: "STATUS = 'ACTIVE'",
outFields: ["OBJECTID", "NAME"],
spatialFilter: envelope(-158.5, 21.2, -157.6, 21.7),
orderBy: [{ field: "REPORTED_AT", direction: "desc" }],
pagination: { limit: 500 },
returnGeometry: true,
};
interface Query<_T> {
    aggregation?: AggregationSpec;
    orderBy?: readonly SortSpec[];
    outFields?: readonly string[];
    outSr?: string | number;
    pagination?: PaginationSpec;
    returnGeometry?: boolean;
    signal?: AbortSignal;
    spatialFilter?: SpatialFilter;
    where?: string;
}

Type Parameters

  • _T = Record<string, unknown>

Properties

aggregation?: AggregationSpec

Aggregation request; if present the Result contains aggregate rows.

orderBy?: readonly SortSpec[]

Sort order.

outFields?: readonly string[]

Subset of fields to return. Adapters default to all when omitted.

outSr?: string | number

Output spatial reference (WKID, "auto", or full reference object).

pagination?: PaginationSpec

Pagination.

returnGeometry?: boolean

Whether the result envelope should include geometry.

signal?: AbortSignal

Caller-supplied cancellation.

spatialFilter?: SpatialFilter

Spatial constraint. Reuses core/spatial-filter.ts.

where?: string

Source-native filter text retained for v1 compatibility. Its language is selected by the source adapter (for example GeoServices SQL-92, CQL2 text, OData, or DuckDB SQL) and is never protocol neutral.

Build a typed semantic filter through @honua/sdk-js/query-planner; use legacyWhereToNativeFilter only while migrating existing protocol-bound text.