src.com.ziclix.python.sql.pipe.Source Maven / Gradle / Ivy
/*
* Jython Database Specification API 2.0
*
*
* Copyright (c) 2001 brian zimmer
*
*/
package com.ziclix.python.sql.pipe;
import org.python.core.PyObject;
/**
* A Source produces data to be consumed by a Sink. The data can be generated
* from anywhere, but must follow the format detail in next().
*
* @author brian zimmer
* @see #next
* @see Sink
*/
public interface Source {
/**
* Invoked at the start of processing.
*/
public void start();
/**
* Return the next row from the source.
* The following format:
* [(colName, colType), (colName, colType), ...]
* for headers and:
* [(col), (colName, colType), ...]
* for all other data must be used.
*/
public PyObject next();
/**
* Invoked at the end of processing. This method is guarenteed to be called.
*/
public void end();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy