Search in sources :

Example 1 with PipeExporter

use of com.teradata.jaqy.exporter.PipeExporter in project jaqy by Teradata.

the class PipeImporterFactory method getHandler.

@Override
public PipeImporter getHandler(CommandLine cmdLine, JaqyInterpreter interpreter) throws Exception {
    JaqyExporter exporter = interpreter.getExporter();
    if (exporter == null)
        interpreter.error("No current pipe export.");
    else if (!(exporter instanceof PipeExporter))
        interpreter.error("Current export is not a pipe export.");
    JaqyResultSet rs = ((PipeExporter) exporter).getResultSet();
    if (rs == null)
        interpreter.error("Data has not been exported.");
    interpreter.setExporter(null);
    return new PipeImporter(rs, interpreter.getGlobals());
}
Also used : PipeExporter(com.teradata.jaqy.exporter.PipeExporter) JaqyResultSet(com.teradata.jaqy.interfaces.JaqyResultSet) JaqyExporter(com.teradata.jaqy.interfaces.JaqyExporter)

Aggregations

PipeExporter (com.teradata.jaqy.exporter.PipeExporter)1 JaqyExporter (com.teradata.jaqy.interfaces.JaqyExporter)1 JaqyResultSet (com.teradata.jaqy.interfaces.JaqyResultSet)1