BufferedMessageSocket

skunk.net.BufferedMessageSocket
See theBufferedMessageSocket companion object
trait BufferedMessageSocket[F[_]] extends MessageSocket[F]

A MessageSocket that buffers incoming messages, removing and handling asynchronous back-end messages. This splits the protocol into a [logically] synchronous message exchange plus a set of out-of-band broadcast channels that can be observed or ignored at the user's discretion.

Attributes

Companion:
object
Source:
BufferedMessageSocket.scala
Graph
Supertypes
trait MessageSocket[F]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

Stream of all channel notifications that this Session is subscribed to. Note that once such a stream is started it is important to consume all notifications as quickly as possible to avoid blocking message processing for other operations on the Session (although typically a dedicated Session will receive channel notifications so this won't be an issue).

Stream of all channel notifications that this Session is subscribed to. Note that once such a stream is started it is important to consume all notifications as quickly as possible to avoid blocking message processing for other operations on the Session (although typically a dedicated Session will receive channel notifications so this won't be an issue).

Attributes

maxQueued

the maximum number of notifications to hold in a queue before [semantically] blocking message exchange on the controlling Session.

See also:
Source:
BufferedMessageSocket.scala

Signal representing the current state of all Postgres configuration variables announced to this session. These are sent after authentication and are updated asynchronously if the runtime environment changes. The current keys are as follows (with example values), but these may change with future releases so you should be prepared to handle unexpected ones.

Signal representing the current state of all Postgres configuration variables announced to this session. These are sent after authentication and are updated asynchronously if the runtime environment changes. The current keys are as follows (with example values), but these may change with future releases so you should be prepared to handle unexpected ones.

Map(
 "application_name"            -> "",
 "client_encoding"             -> "UTF8",
 "DateStyle"                   -> "ISO, MDY",
 "integer_datetimes"           -> "on",       // cannot change after startup
 "IntervalStyle"               -> "postgres",
 "is_superuser"                -> "on",
 "server_encoding"             -> "UTF8",     // cannot change after startup
 "server_version"              -> "9.5.3",    // cannot change after startup
 "session_authorization"       -> "postgres",
 "standard_conforming_strings" -> "on",
 "TimeZone"                    -> "US/Pacific",
)

Attributes

Source:
BufferedMessageSocket.scala

Signal broadcasting the current TransactionStatus which is reported after each completed message exchange. Note that this value may be stale in the case of a raised exception, which should prompt the front end to send a Sync message but currently does not.

Signal broadcasting the current TransactionStatus which is reported after each completed message exchange. Note that this value may be stale in the case of a raised exception, which should prompt the front end to send a Sync message but currently does not.

Attributes

Source:
BufferedMessageSocket.scala

Inherited methods

def expect[B](f: PartialFunction[BackendMessage, B])(implicit or: Origin): F[B]

Attributes

Inherited from:
MessageSocket
Source:
MessageSocket.scala
def flatExpect[B](f: PartialFunction[BackendMessage, F[B]])(implicit or: Origin): F[B]

Attributes

Inherited from:
MessageSocket
Source:
MessageSocket.scala
def history(max: Int): F[List[Either[Any, Any]]]

Destructively read the last n messages from the circular buffer.

Destructively read the last n messages from the circular buffer.

Attributes

Inherited from:
MessageSocket
Source:
MessageSocket.scala

Receive the next BackendMessage, or raise an exception if EOF is reached before a complete message arrives.

Receive the next BackendMessage, or raise an exception if EOF is reached before a complete message arrives.

Attributes

Inherited from:
MessageSocket
Source:
MessageSocket.scala
def send(message: FrontendMessage): F[Unit]

Send the specified message.

Send the specified message.

Attributes

Inherited from:
MessageSocket
Source:
MessageSocket.scala