Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions PostgresProtocol.closeStatement

1
2
3
4
5
module juptune.postgres.protocol.connection;

Result closeStatement(
    const char[] statementName
);

Documentation

Sends a Close message (followed by a Sync message) simultaneously, which tells the backend to close a prepared statement by its name. If no prepared statement for the given name exists, then nothing happens.

Notes

Under most circumstances, when an error is produced it is safe to continue using an instance of this struct as it will attempt to self-correct. User code should use .isReadyToQueryto double check whether continued use is safe.

Assertions

This function can only be called once .connectsuccesfully executes.

Params

Throws

PostgresProtocolError.bufferTooSmallif the buffer would exceed PostgresProtocolConfig.maxBufferSizewhen reading or writing.

PostgresProtocolError.unexpectedMessageif an unexpected message was returned by the server.

PostgresProtocolError.invalidMessageif a message returned by the server is in some way malformed.

PostgresProtocolError.notEnoughBytesif the server didn't send enough bytes than expected (more likely a Juptune parsing bug).

PostgresProtocolError.errorResponseif the server returned an ErrorResponse message.

Anything that .putand .receivefor TcpSocketand TlsSocketcan throw.

Returns

An errorful Resultif something went wrong.