PostgresNIO Documentation

Structure Postgres​Message.​Startup

@available(*, deprecated, message: "Will be removed from public API")
    public struct Startup: PostgresMessageType  

First message sent from the frontend during startup.

%83 PostgresMessage.Startup PostgresMessage.Startup PostgresMessageType PostgresMessageType PostgresMessage.Startup->PostgresMessageType

Member Of

PostgresMessage

A frontend or backend Postgres message.

Conforms To

PostgresMessageType

Initializers

init(protocol​Version:​parameters:​)

public init(protocolVersion: Int32, parameters: [String: String])  

Creates a new PostgreSQLStartupMessage.

Properties

identifier

public static var identifier: PostgresMessage.Identifier  

description

public var description: String  

protocol​Version

public var protocolVersion: Int32

The protocol version number. The most significant 16 bits are the major version number (3 for the protocol described here). The least significant 16 bits are the minor version number (0 for the protocol described here).

parameters

public var parameters: [String: String] 

The protocol version number is followed by one or more pairs of parameter name and value strings. A zero byte is required as a terminator after the last name/value pair. Parameters can appear in any order. user is required, others are optional. Each parameter is specified as:

Methods

version​Three(parameters:​)

public static func versionThree(parameters: [String: String]) -> Startup  

Creates a Startup with "3.0" as the protocol version.

serialize(into:​)

public func serialize(into buffer: inout ByteBuffer)  

Serializes this message into a byte buffer.