Interface CopyInParser (0.15.0)

public interface CopyInParser

Common interface for parsers that implement one or more of the PostgreSQL COPY formats.

Static Methods

create(SessionState sessionState, CopyStatement.Format format, CSVFormat csvFormat, PipedInputStream inputStream, boolean hasHeader)

public static CopyInParser create(SessionState sessionState, CopyStatement.Format format, CSVFormat csvFormat, PipedInputStream inputStream, boolean hasHeader)

Creates a CopyInParser for the given format. The csvFormat argument is only required for non-binary formats.

Parameters
Name Description
sessionState SessionState
format CopyStatement.Format
csvFormat org.apache.commons.csv.CSVFormat
inputStream PipedInputStream
hasHeader boolean
Returns
Type Description
CopyInParser
Exceptions
Type Description
IOException

Methods

close()

public abstract void close()

Closes this parser and releases any resources associated with it.

Exceptions
Type Description
IOException

iterator()

public abstract Iterator<CopyRecord> iterator()

Returns an iterator of COPY records.

Returns
Type Description
Iterator<CopyRecord>