Package-level declarations

Types

Link copied to clipboard
internal sealed interface AuthenticationMessage : BackendMessage

Authentication response sent by the server (Tag 'R').

Link copied to clipboard
internal class BackendCopyDataMessage(val data: ByteArray) : BackendMessage

Contains data during a COPY operation (received from the backend).

Link copied to clipboard

Indicates completion of a COPY operation by the backend.

Link copied to clipboard
internal class BackendKeyDataMessage(val processId: Int, val secretKey: ByteArray) : BackendMessage

Data about keys for canceling queries (Tag 'K').

Link copied to clipboard
internal sealed interface BackendMessage

Base interface for all messages received from the PostgreSQL backend.

Link copied to clipboard

Response indicating that a Bind command has completed successfully.

Link copied to clipboard
internal class CommandCompleteMessage(val tag: String) : BackendMessage

Response indicating that an SQL command has completed successfully.

Link copied to clipboard
internal class CopyBothResponseMessage(val format: Byte, val numColumns: Short, val columnFormats: List<Short>) : BackendMessage

Response indicating that the backend is ready for COPY BOTH.

Link copied to clipboard
internal class CopyInResponseMessage(val format: Byte, val numColumns: Short, val columnFormats: List<Short>) : BackendMessage

Response indicating that the backend is ready to receive COPY IN data.

Link copied to clipboard
internal class CopyOutResponseMessage(val format: Byte, val numColumns: Short, val columnFormats: List<Short>) : BackendMessage

Response indicating that the backend is ready to send COPY OUT data.

Link copied to clipboard
internal class DataRowMessage(val rawData: ByteArray, val columnOffsets: IntArray, val columnLengths: IntArray) : BackendMessage

Represents a single row of data from a query response. Note: The underlying arrays (rawData, columnOffsets, columnLengths) may be shared buffers reused by the connection to avoid memory allocations. They should be processed synchronously (e.g. eagerly deserialized) and not stored for later use, as their contents will be overwritten by subsequent rows unless the row data size exceeded the configured maxCachedRowSize.

Link copied to clipboard

Response indicating that an empty query string was sent to the backend.

Link copied to clipboard
internal class ErrorOrNoticeMessage(val fields: Map<Char, String>) : BackendMessage

The fields of an ErrorResponse (Tag 'E') or of a NoticeResponse (Tag 'N').

Link copied to clipboard
internal class FieldDescription(val name: String, val tableOid: Int, val columnAttrNumber: Short, val dataTypeOid: Int, val dataTypeSize: Short, val typeModifier: Int, val formatCode: Short)

The description of a single field (column) as it arrives inside a RowDescription message.

Link copied to clipboard
internal class NegotiateProtocolVersionMessage(val newestMinorVersion: Int, val unrecognizedOptions: List<String>) : BackendMessage

Message sent by the server to negotiate the protocol version. Introduced in PostgreSQL 14 to handle minor version upgrades.

Link copied to clipboard
internal object NoDataMessage : BackendMessage

Response indicating that a query returned no data.

Link copied to clipboard
internal class ParameterStatusMessage(val name: String, val value: String) : BackendMessage

Information about connection parameter (Tag 'S').

Link copied to clipboard

Response indicating that a Parse command has completed successfully.

Link copied to clipboard

Response indicating that portal execution was suspended because the row limit was reached.

Link copied to clipboard
internal class ReadyForQueryMessage(val transactionStatus: Char) : BackendMessage

Ready to accept queries (Tag 'Z').

Link copied to clipboard

Response containing the description of rows returned by a query.