public interface CopyInBuilder
COPY FROM STDIN operation.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_FRAME_SIZE
Postgres parse limit for large messages
2^30 - 1 bytes. |
| Modifier and Type | Method and Description |
|---|---|
Mono<Long> |
build()
Build the final publisher that initiates the
COPY operation. |
default CopyInBuilder |
from(byte[] stdin)
Configure an input buffer that is written to a single
CopyData frame. |
default CopyInBuilder |
from(byte[] stdin,
int offset,
int length)
Configure an input buffer along with
offset and length whose specified chunk is written to a single CopyData frame. |
default CopyInBuilder |
from(io.netty.buffer.ByteBuf stdin)
Configure an input buffer that is written to a single
CopyData frame. |
default CopyInBuilder |
from(ByteBuffer stdin)
Configure an input buffer that is written to a single
CopyData frame. |
default CopyInBuilder |
from(Publisher<io.netty.buffer.ByteBuf> stdin)
|
CopyInBuilder |
fromMany(Publisher<? extends Publisher<io.netty.buffer.ByteBuf>> stdin)
|
static final int MAX_FRAME_SIZE
2^30 - 1 bytes.CopyInBuilder fromMany(Publisher<? extends Publisher<io.netty.buffer.ByteBuf>> stdin)
Publisher emitting publishers of buffers that to write data to a CopyData frame 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 the CopyData frame.
If a provided publisher terminates with an error signal then the copy operation terminates with a failure and gets cancelled on the server.
default CopyInBuilder from(Publisher<io.netty.buffer.ByteBuf> stdin)
Publisher emitting buffers that are written to a single CopyData frame.
If the total amount of data to be written exceeds the copy frame size limitation (MAX_FRAME_SIZE), then use fromMany(Publisher) to split up the input data to many
CopyData frames.
If the provided publisher terminates with an error signal then the copy operation terminates with a failure and gets cancelled on the server.
default CopyInBuilder from(io.netty.buffer.ByteBuf stdin)
CopyData frame.default CopyInBuilder from(ByteBuffer stdin)
CopyData frame.default CopyInBuilder from(byte[] stdin)
CopyData frame.default CopyInBuilder from(byte[] stdin, int offset, int length)
offset and length whose specified chunk is written to a single CopyData frame.Mono<Long> build()
COPY operation. 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.COPY operation upon subscription.Copyright © 2024. All rights reserved.