Interface Dataset

Logical grouping of one or more sources sharing identity and (optionally) a field schema. Dataset is the canonical entry point: createDataset gates the compatibility check and caches it per HonuaClient.

const dataset = createDataset({ id: "parcels", client, sources: [...] });
if (!(await dataset.isCompatible())) throw new Error("server too old");
for (const id of dataset.sourceIds()) {
console.log(id, dataset.source(id)?.capabilities);
}
interface Dataset {
    client: HonuaClient;
    id: string;
    sourceDescriptors: readonly SourceDescriptor[];
    isCompatible(): Promise<boolean>;
    source<T>(id: string): undefined | CapabilityAwareSource<T>;
    sourceIds(): readonly string[];
    supportsFeature(feature: keyof HonuaServerCompatibilityFeatures): Promise<boolean>;
}

Properties

client: HonuaClient
id: string
sourceDescriptors: readonly SourceDescriptor[]

Methods