package protocol
- Alphabetic
- Public
- Protected
Type Members
- case class Authorized() extends Response[Authorized] with Product with Serializable
Server response when the authorization was succeed
- case class BatchQuery(id: Int, query: String, params: Seq[Map[Int, ParameterValue]]) extends Command[BatchQuery] with Product with Serializable
Batch query
Batch query
- id
request id
- query
query text
- params
list of params
- case class Cancel(id: Int) extends Command[Cancel] with Product with Serializable
Cancels query execution without reading to the end.
- case class Cancelled(id: Int) extends Response[Cancelled] with Product with Serializable
Server response when the query was canceled by Cancel command
- abstract class Command[C <: Message[C]] extends Message[C]
Base class for client messages
- case class Credentials(method: String, user: Option[String], password: Option[String]) extends Command[Credentials] with Product with Serializable
Credentials response from the client
Credentials response from the client
- method
authentication method
- user
user name
- password
password
- case class CredentialsRequest(methods: Seq[String]) extends Response[CredentialsRequest] with Product with Serializable
Authentication request
Authentication request
- methods
supported authentication methods
- case class ErrorMessage(message: String, streamId: Option[Int] = None, severity: Byte = ErrorMessage.SEVERITY_ERROR) extends Response[ErrorMessage] with Product with Serializable
Error message from server to client
Error message from server to client
- message
text of the message
- streamId
if the error related to some query
- severity
message importance
- case class Frame[B](frameType: Byte, payload: B) extends Product with Serializable
Frame representation
Frame representation
- frameType
message type
- payload
serialized message
- case class Heartbeat(time: Int) extends Command[Heartbeat] with Product with Serializable
Keep alive message from client to server
- case class Hello(protocolVersion: Int, clientVersion: String, timestamp: Long, params: Map[String, String]) extends Command[Hello] with Product with Serializable
Greeting message from client to server
Greeting message from client to server
- protocolVersion
client protocol version
- clientVersion
client version
- timestamp
client timestamp
- params
extra params, reserved for new features.
- case class HelloResponse(protocolVersion: Int, reqTime: Long) extends Response[HelloResponse] with Product with Serializable
Server greeting to the client
Server greeting to the client
- protocolVersion
server protocol version
- reqTime
client request time from Hello
- trait Message[M <: Message[M]] extends AnyRef
Base class for all messages.
- trait MessageHelper[M <: Message[M]] extends AnyRef
Helper class for a message type.
Helper class for a message type. Provides methods to serialize and deserialize messages.
- M
type of the message
- case class NextBatch(id: Int, batchSize: Int) extends Command[NextBatch] with Product with Serializable
Request for next batch of data
Request for next batch of data
- id
request id
- batchSize
size of requested batch
- case class NumericValue(value: BigDecimal) extends ParameterValue with Product with Serializable
- sealed trait ParameterValue extends AnyRef
- case class Quit() extends Command[Quit] with Product with Serializable
- trait Read[T] extends AnyRef
- trait ReadWrite[T] extends Read[T] with Write[T]
Type class for data serialization from / to the ByteReaderWriter
Type class for data serialization from / to the ByteReaderWriter
- T
type to be serialized
- abstract class Response[R <: Response[R]] extends Message[R]
Base class for server messages
- case class ResultField(name: String, typeName: String) extends Product with Serializable
Field definition
Field definition
- name
field name
- typeName
field type, e.g VARCHAR, INTEGER
- case class ResultFooter(id: Int, millis: Long, rows: Int) extends Response[ResultFooter] with Product with Serializable
Query execution statistics
Query execution statistics
- id
request id
- millis
execution time
- rows
number of rows provided to the client
- case class ResultHeader(id: Int, tableName: String, fields: Seq[ResultField]) extends Response[ResultHeader] with Product with Serializable
Query execution result header
Query execution result header
- id
request id
- tableName
result table name
- fields
fields definitions
- case class ResultRow(id: Int, values: Seq[Array[Byte]]) extends Response[ResultRow] with Product with Serializable
Query result row
Query result row
- id
request id
- values
result values serialized into arrays of bytes
- case class SqlQuery(id: Int, query: String, params: Map[Int, ParameterValue]) extends Command[SqlQuery] with Product with Serializable
Query request
Query request
- id
request id. Must be unique within single connection uncompleted queries
- query
query string
- params
parameters if there are any (for prepared queries).
- case class StringValue(value: String) extends ParameterValue with Product with Serializable
- case class TimestampValue(millis: Long) extends ParameterValue with Product with Serializable
- trait Write[T] extends AnyRef
Value Members
- object Authorized extends MessageHelper[Authorized] with Serializable
- object BatchQuery extends MessageHelper[BatchQuery] with Serializable
- object Cancel extends MessageHelper[Cancel] with Serializable
- object Cancelled extends MessageHelper[Cancelled] with Serializable
- object Credentials extends MessageHelper[Credentials] with Serializable
- object CredentialsRequest extends MessageHelper[CredentialsRequest] with Serializable
- object ErrorMessage extends MessageHelper[ErrorMessage] with Serializable
- object Frame extends Serializable
- object Heartbeat extends MessageHelper[Heartbeat] with Serializable
- object Hello extends MessageHelper[Hello] with Serializable
- object HelloResponse extends MessageHelper[HelloResponse] with Serializable
- object NextBatch extends MessageHelper[NextBatch] with Serializable
- object ParameterValue
- object ProtocolVersion
- object Quit extends MessageHelper[Quit] with Serializable
Notify server about before closing connection.
- object Read
- object ReadWrite
- object ResultFooter extends MessageHelper[ResultFooter] with Serializable
- object ResultHeader extends MessageHelper[ResultHeader] with Serializable
- object ResultRow extends MessageHelper[ResultRow] with Serializable
- object SqlQuery extends MessageHelper[SqlQuery] with Serializable
- object Tags extends Enumeration
Protocol messages tags.
Protocol messages tags. Client messages use lower case chars, server messages use upper case.
- object Write