Interface CopyInBuilder
public interface CopyInBuilder
Interface specifying a builder contract to configure a
COPY FROM STDIN operation.- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPostgres parse limit for large messages2^30 - 1bytes. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the final publisher that initiates theCOPYoperation.default CopyInBuilderfrom(byte[] stdin) Configure an input buffer that is written to a singleCopyDataframe.default CopyInBuilderfrom(byte[] stdin, int offset, int length) Configure an input buffer along withoffsetandlengthwhose specified chunk is written to a singleCopyDataframe.default CopyInBuilderfrom(io.netty.buffer.ByteBuf stdin) Configure an input buffer that is written to a singleCopyDataframe.default CopyInBuilderfrom(ByteBuffer stdin) Configure an input buffer that is written to a singleCopyDataframe.default CopyInBuilder
-
Field Details
-
MAX_FRAME_SIZE
static final int MAX_FRAME_SIZEPostgres parse limit for large messages2^30 - 1bytes.- See Also:
-
-
Method Details
-
fromMany
Configure aPublisheremitting publishers of buffers that to write data to aCopyDataframe per emitted publisher. This method allows controlling flush behavior and chunking of buffers. The provided stream must ensure to not exceed size limits (MAX_FRAME_SIZE) of theCopyDataframe.If a provided publisher terminates with an error signal then the copy operation terminates with a failure and gets cancelled on the server.
-
from
Configure aPublisheremitting buffers that are written to a singleCopyDataframe. If the total amount of data to be written exceeds the copy frame size limitation (MAX_FRAME_SIZE), then usefromMany(Publisher)to split up the input data to manyCopyDataframes.If the provided publisher terminates with an error signal then the copy operation terminates with a failure and gets cancelled on the server.
-
from
Configure an input buffer that is written to a singleCopyDataframe. -
from
Configure an input buffer that is written to a singleCopyDataframe. -
from
Configure an input buffer that is written to a singleCopyDataframe. -
from
Configure an input buffer along withoffsetandlengthwhose specified chunk is written to a singleCopyDataframe. -
build
Build the final publisher that initiates theCOPYoperation. The copy data messages sent to the server are triggered by the provided input buffer. Cancelling the copy operation sends a failure frame to the server to terminate the copy operation with an error.- Returns:
- the publisher that initiates the
COPYoperation upon subscription.
-