UNPKG

@hpcc-js/comms

Version:
89 lines (88 loc) 3.5 kB
import { Cache, StateObject } from "@hpcc-js/util"; import { IConnection, IOptions } from "../connection"; import { WsDfu } from "../services/wsDFU"; import { WorkunitsService, WsWorkunits } from "../services/wsWorkunits"; import { XSDSchema, XSDXMLNode } from "./xsdParser"; export declare class GlobalResultCache extends Cache<{ BaseUrl: string; Wuid: string; ResultName: string; }, Result> { constructor(); } export type ResultFilter = { [key: string]: string | number; }; export interface ECLResultEx extends WsWorkunits.ECLResult { Wuid: string; ResultName?: string; ResultSequence?: number; LogicalFileName?: string; NodeGroup?: string; ResultViews: string[]; } export interface WUResultResponseEx { Exceptions: WsWorkunits.Exceptions; Wuid: string; Sequence: WsWorkunits.int; LogicalName: string; Cluster: string; Name: string; Start: WsWorkunits.long; Requested: WsWorkunits.int; Count: WsWorkunits.int; Total: WsWorkunits.long; Result: { [key: string]: any[]; } & { XmlSchema?: { xml: string; }; }; } export type UResulState = ECLResultEx & WsDfu.DFULogicalFile; export type IResulState = ECLResultEx | WsDfu.DFULogicalFile; export declare class Result extends StateObject<UResulState, IResulState> implements ECLResultEx { protected connection: WorkunitsService; readonly BaseUrl: string; protected xsdSchema: XSDSchema; readonly properties: WsWorkunits.ECLResult; readonly Wuid: string; readonly ResultName: string | undefined; readonly ResultSequence: number | undefined; readonly LogicalFileName: string | undefined; readonly Name: string; readonly Sequence: number; readonly Value: string; readonly Link: string; readonly FileName: string; readonly IsSupplied: boolean; readonly ShowFileContent: boolean; readonly Total: number; readonly ECLSchemas: WsWorkunits.ECLSchemas; readonly NodeGroup: string; readonly ResultViews: string[]; readonly XmlSchema: string; static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, name: string): any; static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, sequence: number): any; static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclResult: WsWorkunits.ECLResult, resultViews: string[]): any; static attachLogicalFile(optsConnection: IOptions | IConnection | WorkunitsService, nodeGroup: string, logicalFile: string): Result; private constructor(); private constructor(); private constructor(); private constructor(); isComplete(): boolean; private _fetchXMLSchemaPromise; fetchXMLSchema(refresh?: boolean): Promise<XSDSchema | null>; refresh(): Promise<this>; fetchRows(from?: number, count?: number, includeSchema?: boolean, filter?: ResultFilter, abortSignal?: AbortSignal): Promise<any[]>; rootField(): XSDXMLNode | null; fields(): XSDXMLNode[]; protected WUResult(start?: number, count?: number, suppressXmlSchema?: boolean, filter?: { [key: string]: string | number; }, abortSignal?: AbortSignal): Promise<WUResultResponseEx>; } export declare class ResultCache extends Cache<WsWorkunits.ECLResult, Result> { constructor(); } //# sourceMappingURL=result.d.ts.map