class SimpleQueryMachine extends StateMachine[SimpleQueryResponse]
Implements the "Simple Query" flow described here https://www.postgresql.org/docs/current/protocol-flow.html#id-1.10.5.7.4
Note that the name is somewhat misleading since the flow is not particularly simple due to the fact that it supports an arbitrary number of queries in a single message, i.e.: "multi-line queries".
For example, the client may send CREATE TABLE (...); CREATE INDEX ...
in a single query. All types of queries
are supported.
- Alphabetic
- By Inheritance
- SimpleQueryMachine
- StateMachine
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SimpleQueryMachine(query: String, parameters: ConnectionParameters)
Type Members
- sealed trait State extends AnyRef
- case class StreamResponses(pipe: Pipe[QueryResponse], lastWrite: Future[Unit]) extends State with Product with Serializable
- case class StreamResult(rowDescription: RowDescription, pipe: Pipe[DataRow], lastWrite: Future[Unit]) extends Product with Serializable
- case class StreamResultState(responses: StreamResponses, result: StreamResult) extends State with Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def handleResponse(responses: StreamResponses, msg: BackendMessage): State
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def receive(state: State, msg: BackendMessage): TransitionResult[State, SimpleQueryResponse]
Given the current state and a message from the backend server, this method will produce the appropriate transition to execute.
Given the current state and a message from the backend server, this method will produce the appropriate transition to execute.
Specifically, this may be additional messages to send to the backend, a response to send to the client, etc.
- state
the current state of the connection previously returned by a call to
start
orreceive
.- msg
the message received from the backend server
- returns
the transition to execute to realize the new state
- Definition Classes
- SimpleQueryMachine → StateMachine
- def start: TransitionResult[State, SimpleQueryResponse]
The initial transition to execute upon starting this particular machine.
The initial transition to execute upon starting this particular machine. Normally, this will contain
Send
actions to send messages to the Postgres backend.- returns
the initial transition to execute upon starting the machine.
- Definition Classes
- SimpleQueryMachine → StateMachine
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- case object Sent extends State with Product with Serializable
- object StreamResponses extends Serializable
- object StreamResult extends Serializable