Protocol

ldbc.connector.net.Protocol
See theProtocol companion object
trait Protocol[F[_]] extends UtilityCommands[F], Authentication[F]

Protocol is a protocol to communicate with MySQL server. It provides a way to authenticate, reset sequence id, and close the connection.

Type parameters

F

the effect type

Attributes

Companion
object
Source
Protocol.scala
Graph
Supertypes
trait Authentication[F]
trait UtilityCommands[F]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Class that holds MySQL host information.

Class that holds MySQL host information.

Attributes

Returns

the host information

Source
Protocol.scala

Returns the initial packet.

Returns the initial packet.

Attributes

Returns

the initial packet

Source
Protocol.scala
def readUntilEOF[P <: ResponsePacket](decoder: Decoder[P | EOFPacket | ERRPacket]): F[Vector[P]]

Reads until EOF is reached.

Reads until EOF is reached.

Type parameters

P

the type of the response packet

Value parameters

decoder

the decoder to decode the response packet

Attributes

Returns

a vector of the response packets

Source
Protocol.scala
def receive[P <: ResponsePacket](decoder: Decoder[P]): F[P]

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

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

Attributes

Source
Protocol.scala
def repeatProcess[P <: ResponsePacket](times: Int, decoder: Decoder[P]): F[Vector[P]]

Repeats the process times times.

Repeats the process times times.

Type parameters

P

the type of the response packet

Value parameters

decoder

the decoder to decode the response packet

times

the number of times to repeat the process

Attributes

Returns

a vector of the response packets

Source
Protocol.scala

Resets the connection.

Resets the connection.

Attributes

Source
Protocol.scala

Resets the sequence id.

Resets the sequence id.

Attributes

Source
Protocol.scala
def send(request: RequestPacket): F[Unit]

Send the specified request packet.

Send the specified request packet.

Attributes

Source
Protocol.scala

Returns the server variables.

Returns the server variables.

Attributes

Source
Protocol.scala
def setOption(optionOperation: EnumMySQLSetOption): F[Unit]

Controls whether or not multiple SQL statements are allowed to be executed at once.

Controls whether or not multiple SQL statements are allowed to be executed at once.

NOTE: It can only be used for batch processing with Insert, Update, and Delete statements.

Value parameters

optionOperation

EnumMySQLSetOption.MYSQL_OPTION_MULTI_STATEMENTS_ON or EnumMySQLSetOption.MYSQL_OPTION_MULTI_STATEMENTS_OFF

Attributes

Source
Protocol.scala

Concrete methods

Disables multiple SQL statements to be executed at once.

Disables multiple SQL statements to be executed at once.

NOTE: It can only be used for batch processing with Insert, Update, and Delete statements.

Attributes

Source
Protocol.scala

Enables multiple SQL statements to be executed at once.

Enables multiple SQL statements to be executed at once.

NOTE: It can only be used for batch processing with Insert, Update, and Delete statements.

Attributes

Source
Protocol.scala

Inherited and Abstract methods

def changeUser(user: String, password: String): F[Unit]

Change the user.

Change the user.

Value parameters

password

Password

user

Username

Attributes

Inherited from:
Authentication
Source
Authentication.scala
def comInitDB(schema: String): F[Unit]

Initialize the database

Initialize the database

Value parameters

schema

the name of a schema in which to work

Attributes

Inherited from:
UtilityCommands
Source
UtilityCommands.scala
def comPing(): F[Boolean]

Check if the server is alive.

Check if the server is alive.

Attributes

Inherited from:
UtilityCommands
Source
UtilityCommands.scala
def comQuit(): F[Unit]

Quit the connection

Quit the connection

Attributes

Inherited from:
UtilityCommands
Source
UtilityCommands.scala

Reset the connection

Reset the connection

Attributes

Inherited from:
UtilityCommands
Source
UtilityCommands.scala
def comSetOption(optionOperation: EnumMySQLSetOption): F[Unit]

Set an option

Set an option

Value parameters

optionOperation

the option operation

Attributes

Inherited from:
UtilityCommands
Source
UtilityCommands.scala

Get the statistics of the connection

Get the statistics of the connection

Attributes

Inherited from:
UtilityCommands
Source
UtilityCommands.scala
def startAuthentication(username: String, password: String): F[Unit]

Start the authentication process.

Start the authentication process.

Value parameters

password

Password

username

Username

Attributes

Inherited from:
Authentication
Source
Authentication.scala