Package org.mariadb.jdbc.message.client
Class ChangeDbPacket
- java.lang.Object
-
- org.mariadb.jdbc.message.client.ChangeDbPacket
-
- All Implemented Interfaces:
RedoableClientMessage
,ClientMessage
public final class ChangeDbPacket extends java.lang.Object implements RedoableClientMessage
change database. See https://mariadb.com/kb/en/com_init_db/ protocol
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
database
-
Constructor Summary
Constructors Constructor Description ChangeDbPacket(java.lang.String database)
Constructor to encode COM_INIT_DB packet
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
encode(Writer writer, Context context)
Encode client message to socket.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.message.ClientMessage
batchUpdateLength, binaryProtocol, canSkipMeta, description, getLocalInfileInputStream, mightBeBulkResult, readPacket, validateLocalFileName
-
Methods inherited from interface org.mariadb.jdbc.message.client.RedoableClientMessage
encode, ensureReplayable, reEncode, saveParameters
-
-
-
-
Method Detail
-
encode
public int encode(Writer writer, Context context) throws java.io.IOException
Description copied from interface:ClientMessage
Encode client message to socket.- Specified by:
encode
in interfaceClientMessage
- Parameters:
writer
- socket writercontext
- connection context- Returns:
- number of client message written
- Throws:
java.io.IOException
- if socket error occur
-
-