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

    Class HonuaOdataEntitySet

    Runtime handle for one OData entity set. Returned by Source.protocol("odata") so callers can reach the dialect-specific surface ($batch, $apply, $search, $deltatoken) without leaking OData-shaped types into the canonical Source API.

    Index

    Constructors

    Properties

    basePath: string
    client: HonuaClient
    entitySet: string
    entitySetName: string

    Unqualified entity-set name used as the CSDL metadata-lookup key. Equals entitySet for direct paths like "Parcels". For layer-scoped navigation paths like "Layers(1)/Features" it is the navigation suffix "Features" so capability and schema lookups still find the entry the server emits in <EntitySet Name="…">.

    Methods

    • Run an $apply aggregation. The OData server applies the transformation pipeline (aggregate, groupby, filter, compute); the SDK returns the rows unchanged so callers can shape them onto the canonical Result.aggregateRows.

      Parameters

      • transformations: string
      • params: { filter?: string; signal?: AbortSignal } = {}

      Returns Promise<HonuaOdataAggregateResult>

    • $deltatoken-driven change feed. Yields HonuaOdataDeltaPage per server response. The final page carries deltaLink; callers persist the encoded token for the next call to delta({ since }).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • options: { signal?: AbortSignal; since?: string } = {}

      Returns AsyncGenerator<HonuaOdataDeltaPage<T>, void, undefined>

    • Drain server-driven @odata.nextLink pages. When params.top is supplied it is treated as a hard cap on collected rows. Callers that want a lookahead row to detect truncation must add it themselves; the canonical Source.queryAll path does this with top = limit + 1, while ids-only projections enforce their own result cap. Returning top + 1 here would double-count for callers that already added the lookahead, so this helper respects top exactly.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns Promise<{ rows: readonly T[]; totalCount?: number }>

    • Last-resort raw passthrough — flows through HonuaClient.pipelineFetch so auth headers, retry, timeout, interceptors, telemetry, and normalized error mapping all apply. The returned Response is unconsumed; callers pick .json(), .text(), or .arrayBuffer().

      Parameters

      • method: string
      • path: string
      • init: RequestInit = {}

      Returns Promise<Response>

    • Update a row via PATCH /<entitySet>(<key>). The OData server in Honua Server intentionally does not implement PUT; the SDK issues PATCH with the full canonical body to match a PUT replacement on the canonical surface (documented in docs/protocol-capability-matrix.md under the OData section).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns Promise<T | undefined>