Interface CopyInParser (0.6.1)

public interface CopyInParser

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

Static Methods

create(CopyTreeParser.CopyOptions.Format format, CSVFormat csvFormat, PipedOutputStream payload, int pipeBufferSize, boolean hasHeader)

public static CopyInParser create(CopyTreeParser.CopyOptions.Format format, CSVFormat csvFormat, PipedOutputStream payload, int pipeBufferSize, boolean hasHeader)

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

Parameters
NameDescription
formatCopyTreeParser.CopyOptions.Format
csvFormatorg.apache.commons.csv.CSVFormat
payloadPipedOutputStream
pipeBufferSizeint
hasHeaderboolean
Returns
TypeDescription
CopyInParser
Exceptions
TypeDescription
IOException

createDefaultTimestampUtils()

public static TimestampUtils createDefaultTimestampUtils()
Returns
TypeDescription
org.postgresql.jdbc.TimestampUtils

Methods

close()

public abstract void close()

Closes this parser and releases any resources associated with it.

Exceptions
TypeDescription
IOException

iterator()

public abstract Iterator<CopyRecord> iterator()

Returns an iterator of COPY records.

Returns
TypeDescription
Iterator<CopyRecord>