How to use the @hpcc-js/ddl-shim.DDL2.isWUResultRef function in @hpcc-js/ddl-shim

To help you get started, we’ve selected a few @hpcc-js/ddl-shim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / marshaller / src / ddl2 / javascriptadapter.ts View on Github external
private datasourceRefID(view: DDL2.IView): string {
        const datasourceRef = view.datasource;
        if (DDL2.isRoxieServiceRef(datasourceRef)) {
            return `${this.safeID(datasourceRef.id)}_${this.safeID(datasourceRef.output)}_${this.safeID(view.id)}`;
        } else if (DDL2.isWUResultRef(datasourceRef)) {
            return `${this.safeID(datasourceRef.id)}_${this.safeID(datasourceRef.output)}`;
        }
        return `${this.safeID(datasourceRef.id)}`;
    }
github hpcc-systems / Visualization / packages / marshaller / src / ddl2 / ddl.ts View on Github external
readDatasourceRef(ddlDSRef: DDL2.IDatasourceRef, dsPicker: DSPicker, elementContainer: ElementContainer): this {
        if (DDL2.isRoxieServiceRef(ddlDSRef)) {
            dsPicker.datasourceID(`${ddlDSRef.id}_${ddlDSRef.output}`);
            const dsRef = dsPicker.datasourceRef() as RoxieResultRef;
            dsRef
                .request(ddlDSRef.request.map(rf => {
                    return Param.fromDDL(this._ec, rf);
                }))
                ;
        } else if (DDL2.isWUResultRef(ddlDSRef)) {
            const wu = this._dsReadDedup[ddlDSRef.id] as WU;
            dsPicker.datasourceID(wu.output(ddlDSRef.output).id());
        } else {
            dsPicker.datasourceID(ddlDSRef.id);
        }
        return this;
    }