@honua/sdk-js
    Preparing search index...

    Interface Query<_T>

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

    filter is the typed, protocol-neutral semantic filter: the same expression compiles to GeoServices SQL-92, CQL2, FES 2.0, OData $filter, and DuckDB SQL. spatialFilter is a SpatialFilter produced by the spatial-filter builders (envelope, point, polygon, bufferEnvelope, …), and temporalFilter is the canonical time constraint (instant or interval).

    import { envelope, queryFilter, type Query } from "@honua/sdk-js";

    const query: Query<{ OBJECTID: number; NAME: string }> = {
    outFields: ["OBJECTID", "NAME"],
    filter: queryFilter.and(
    queryFilter.eq("STATUS", "open"),
    queryFilter.spatial("intersects", envelope(-158.5, 21.2, -157.6, 21.7)),
    ),
    temporalFilter: { kind: "interval", start: "2026-01-01T00:00:00Z", end: null },
    orderBy: [{ field: "REPORTED_AT", direction: "desc" }],
    pagination: { limit: 500 },
    returnGeometry: true,
    };
    interface Query<_T = Record<string, unknown>> {
        aggregation?: AggregationSpec;
        filter?: QueryFilterExpression;
        orderBy?: readonly SortSpec[];
        outFields?: readonly string[];
        outSr?: string | number;
        pagination?: PaginationSpec;
        returnGeometry?: boolean;
        signal?: AbortSignal;
        spatialFilter?: SpatialFilter;
        temporalFilter?: QueryTemporalFilter;
        where?: string;
    }

    Type Parameters

    • _T = Record<string, unknown>
    Index

    Properties

    aggregation?: AggregationSpec

    Aggregation request; if present the Result contains aggregate rows.

    Typed semantic filter. Protocol neutral: adapters compile it to the target dialect and throw HonuaCapabilityNotSupportedError naming the construct and protocol when the target cannot express it exactly — a construct is never silently dropped or widened.

    Composes with spatialFilter, temporalFilter, and (during migration) where; every present constraint is conjunctive.

    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.

    temporalFilter?: QueryTemporalFilter

    Canonical time constraint. Without field it targets the source's own time dimension (GeoServices time=, OGC / STAC datetime=); with field it compiles to an explicit temporal predicate, which is the only form OData, WFS, and GeoParquet can express.

    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.

    Use the typed filter member, which is protocol neutral and fails closed. where is retained only for raw, source-native migration compatibility; legacyWhereToNativeFilter tags existing protocol-bound text while it is being ported.