ldbc.connector.net.packet.response

Members list

Type members

Classlikes

case class AuthMoreDataPacket(status: Int, authenticationMethodData: Array[Byte]) extends AuthenticationPacket

We need to make sure that when sending plugin supplied data to the client they are not considered a special out-of-band command, like e.g.

We need to make sure that when sending plugin supplied data to the client they are not considered a special out-of-band command, like e.g.

ERR_Packet, Protocol::AuthSwitchRequest: or OK_Packet. To avoid this the server will send all plugin data packets "wrapped" in a command \1. Note that the client will continue sending its replies unrwapped: Protocol::AuthSwitchResponse:

Value parameters

authenticationMethodData

Type: string Name: authentication method data Description: Extra authentication data beyond the initial challenge

status

Type: int<1> Name: 0x01 Description: status tag

Attributes

Companion
object
Source
AuthMoreDataPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
AuthMoreDataPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AuthSwitchRequestPacket(status: Int, pluginName: String, pluginProvidedData: Array[Byte]) extends AuthenticationPacket

Authentication method Switch Request Packet

Authentication method Switch Request Packet

If both server and the client support ldbc.connector.data.CapabilitiesFlags.CLIENT_PLUGIN_AUTH capability, server can send this packet tp ask client to use another authentication method.

Value parameters

pluginName

Type: string Name: plugin name Description: name of the client authentication plugin to switch to

pluginProvidedData

Type: string Name: plugin provided data Description: Initial authentication data for that client plugin

status

Type: int<1> Name: 0xFE (254) Description: status tag

Attributes

Companion
object
Source
AuthSwitchRequestPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
AuthSwitchRequestPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

AuthenticationPacket is a trait for all authentication packets.

AuthenticationPacket is a trait for all authentication packets.

Attributes

Companion
object
Source
AuthenticationPacket.scala
Supertypes
trait Packet
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Source
AuthenticationPacket.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Source
BinaryProtocolResultSetRowPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
BinaryProtocolResultSetRowPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class ColumnDefinition320Packet(table: String, name: String, length: Int, columnType: ColumnDataType, flagsLength: Int, flags: Seq[ColumnDefinitionFlags], decimals: Int) extends ColumnDefinitionPacket

The column definition packet is sent by the server to the client in response to a COM_QUERY command.

The column definition packet is sent by the server to the client in response to a COM_QUERY command.

Value parameters

columnType

Type: int<1> Name: type Description: type of the column as defined in enum_field_types

decimals

Type: int<1> Name: decimals Description: max shown decimal digits

  • 0x00 for integers and static strings
  • 0x1f for dynamic strings, double, float
  • 0x00 to 0x51 for decimals
flags

Type: int<2> Name: flags Description: Flags as defined in Column Definition Flags

flagsLength

Type: int Name: length of flags + decimals fields Description: [03]

length

Type: int Name: length of fixed length fields Description: 0x0c

name

Type: string Name: name Description: Column name

table

Type: string Name: table Description: Table name

Attributes

Companion
object
Source
ColumnDefinition320Packet.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ColumnDefinition320Packet.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class ColumnDefinition41Packet(catalog: String, schema: String, table: String, orgTable: String, name: String, orgName: String, length: Int, characterSet: Int, columnLength: Long, columnType: ColumnDataType, flags: Seq[ColumnDefinitionFlags], decimals: Int) extends ColumnDefinitionPacket

The column definition packet is sent by the server to the client in response to a COM_QUERY command.

The column definition packet is sent by the server to the client in response to a COM_QUERY command.

Value parameters

catalog

Type: string Name: catalog Description: The catalog used. Currently always "def"

characterSet

Type: int<2> Name: character_set Description: the column character set as defined in Character Set

columnLength

Type: int<4> Name: column_length Description: maximum length of the field

columnType

Type: int<1> Name: type Description: type of the column as defined in enum_field_types

decimals

Type: int<1> Name: decimals Description: max shown decimal digits

  • 0x00 for integers and static strings
  • 0x1f for dynamic strings, double, float
  • 0x00 to 0x51 for decimals
flags

Type: int<2> Name: flags Description: Flags as defined in Column Definition Flags

length

Type: int Name: length of fixed length fields Description: 0x0c

name

Type: string Name: name Description: virtual column name

orgName

Type: string Name: org_name Description: physical column name

orgTable

Type: string Name: org_table Description: physical table name

schema

Type: string Name: schema Description: schema name

table

Type: string Name: table Description: virtual table name

Attributes

Companion
object
Source
ColumnDefinition41Packet.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ColumnDefinition41Packet.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

A column definition packet is sent by the server to the client after a query is executed. It contains information about the columns of the result set.

A column definition packet is sent by the server to the client after a query is executed. It contains information about the columns of the result set.

Attributes

Companion
object
Source
ColumnDefinitionPacket.scala
Supertypes
trait Packet
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Source
ColumnDefinitionPacket.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class ColumnsNumberPacket(size: Int) extends ResponsePacket

A packet that contains the number of columns in the result set.

A packet that contains the number of columns in the result set.

Value parameters

size

the number of columns in the result set

Attributes

Companion
object
Source
ColumnsNumberPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ColumnsNumberPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class ComStmtPrepareOkPacket(status: Int, statementId: Long, numColumns: Int, numParams: Int, reserved1: Int, warningCount: Int, metadataFollows: Option[Int]) extends ResponsePacket

Packet indicating success when request.ComStmtPreparePacket packet is sent.

Packet indicating success when request.ComStmtPreparePacket packet is sent.

Value parameters

metadataFollows

Flag specifying if metadata are skipped or not.

numColumns

The number of columns in the result set.

numParams

The number of parameters in the prepared statement.

reserved1

Always 0x00

statementId

The server assigns a statement ID to the prepared statement. This value is used for subsequent operations using the statement.

status

0x00: No error

warningCount

The number of warnings.

Attributes

Companion
object
Source
ComStmtPrepareOkPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ComStmtPrepareOkPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class EOFPacket(status: Int, warnings: Option[Int], statusFlags: Option[Int]) extends GenericResponsePackets

If CLIENT_PROTOCOL_41 is enabled, the EOF packet contains a warning count and status flags.

If CLIENT_PROTOCOL_41 is enabled, the EOF packet contains a warning count and status flags.

The EOF_Packet packet may appear in places where a Protocol::LengthEncodedInteger may appear. You must check whether the packet length is less than 9 to make sure that it is a EOF_Packet packet.

Value parameters

status

Type: int<1> Name: header Description: 0xFE EOF packet header

statusFlags

Type: int<2> Name: status_flags Description: SERVER_STATUS_flags_enum

warnings

Type: int<2> Name: warnings Description: number of warnings

Attributes

Companion
object
Source
EOFPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all
object EOFPacket

Attributes

Companion
class
Source
EOFPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
EOFPacket.type
case class ERRPacket(status: Int, errorCode: Int, sqlStateMarker: Int, sqlState: Option[String], errorMessage: String) extends GenericResponsePackets

This packet signals that an error occurred.

This packet signals that an error occurred.

It contains a SQL state value if CLIENT_PROTOCOL_41 is enabled.

Error texts cannot exceed MYSQL_ERRMSG_SIZE

Value parameters

errorCode

Type: int<2> Name: error_code Description: error-code

errorMessage

Type: string Name: error_message Description: human readable error message

sqlState

Type: string<5> Name: sql_state Description: SQL state

sqlStateMarker

Type: string<1> Name: sql_state_marker Description: # marker of the SQL state

status

Type: int<1> Name: header Description: 0xFF ERR packet header

Attributes

Companion
object
Source
ERRPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all
object ERRPacket

Attributes

Companion
class
Source
ERRPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ERRPacket.type

A generic response packet that can be either an OK packet, an EOF packet, or an ERR packet.

A generic response packet that can be either an OK packet, an EOF packet, or an ERR packet.

For most commands the client sends to the server, the server returns one of these packets in response:

  • An OKPacket indicates that the command was successful.
  • An EOFPacket indicates that the command was successful, but that the server has no more data to send in response to the command.
  • An ERRPacket indicates that the command was unsuccessful.

Attributes

Companion
object
Source
GenericResponsePackets.scala
Supertypes
trait Packet
class Object
trait Matchable
class Any
Known subtypes
class EOFPacket
class ERRPacket
class OKPacket

Attributes

Companion
trait
Source
GenericResponsePackets.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class InitialPacket(protocolVersion: Int, serverVersion: Version, threadId: Int, capabilityFlags: Seq[CapabilitiesFlags], characterSet: Int, statusFlags: Seq[ServerStatusFlags], scrambleBuff: Array[Byte], authPlugin: String) extends ResponsePacket

Initial packet sent by the server to the client.

Initial packet sent by the server to the client.

Value parameters

authPlugin

The authentication plugin.

capabilityFlags

The capability flags.

characterSet

The character set.

protocolVersion

The protocol version.

scrambleBuff

The scramble buffer.

serverVersion

The server version.

statusFlags

The status flags are a bit-field.

threadId

The thread ID.

Attributes

Companion
object
Source
InitialPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all
object InitialPacket

Attributes

Companion
class
Source
InitialPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class OKPacket(status: Int, affectedRows: Int, lastInsertId: Int, statusFlags: Seq[ServerStatusFlags], warnings: Option[Int], info: Option[String], sessionStateInfo: Option[String], msg: Option[String]) extends GenericResponsePackets

An OK packet is sent from the server to the client to signal successful completion of a command.

An OK packet is sent from the server to the client to signal successful completion of a command.

if CLIENT_PROTOCOL_41 is set, the packet contains a warning count.

Value parameters

affectedRows

Type: int Name: affected_rows Description: affected rows

info

Type: string Name: info Description: human readable status information

lastInsertId

Type: int Name: last_insert_id Description: last insert-id

msg

Type: string Name: info Description: human readable status information

sessionStateInfo

Type: string Name: session state info Description: Session State Information

status

Type: int<1> Name: header Description: 0x00 or 0xFE the OK packet header

statusFlags

if capabilities & CLIENT_PROTOCOL_41 Type: int<2> Name: status_flags Description: SERVER_STATUS_flags_enum

warnings

if capabilities & CLIENT_PROTOCOL_41 Type: int<2> Name: warnings Description: number of warnings

Attributes

Companion
object
Source
OKPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all
object OKPacket

Attributes

Companion
class
Source
OKPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
OKPacket.type

Represents a row in a result set.

Represents a row in a result set.

Attributes

See also

https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_query_response_text_resultset_row.html A row with data for each column.

  • NULL is sent as 0xFB
  • everything else is converted to a string and is sent as string
Companion
object
Source
ResultSetRowPacket.scala
Supertypes
trait Packet
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Source
ResultSetRowPacket.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class StatisticsPacket(uptime: String, threads: String, questions: String, slowQueries: String, opens: String, flushTables: String, openTables: String, queriesPerSecondAvg: String) extends ResponsePacket

StatisticsPacket is a response packet that contains the statistics of the MySQL server.

StatisticsPacket is a response packet that contains the statistics of the MySQL server.

Value parameters

flushTables

The number of tables flushed by the MySQL server.

openTables

Number of open tables currently held in the cache.

opens

The number of tables opened by the MySQL server.

queriesPerSecondAvg

The average number of queries executed by the MySQL server per second.

questions

The number of questions sent to the MySQL server.

slowQueries

Total number of queries received since the MySQL server started.

threads

The number of threads connected to the MySQL server.

uptime

The uptime of the MySQL server.

Attributes

Companion
object
Source
StatisticsPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
StatisticsPacket.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class UnknownPacket(status: Int, detail: Option[String], originatedPacket: Option[String]) extends ResponsePacket

Represents a response packet that is not recognized by the client.

Represents a response packet that is not recognized by the client.

Value parameters

detail

the detail message of the packet

originatedPacket

the packet that originated the unknown packet

status

the status code of the packet

Attributes

Source
UnknownPacket.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Packet
class Object
trait Matchable
class Any
Show all