use of io.shardingjdbc.proxy.transport.mysql.packet.command.CommandPacket in project sharding-jdbc by shardingjdbc.
the class MySQLFrontendHandler method executeCommand.
@Override
protected void executeCommand(final ChannelHandlerContext context, final ByteBuf message) {
MySQLPacketPayload mysqlPacketPayload = new MySQLPacketPayload(message);
int sequenceId = mysqlPacketPayload.readInt1();
CommandPacket commandPacket = CommandPacketFactory.getCommandPacket(sequenceId, mysqlPacketPayload);
for (DatabaseProtocolPacket each : commandPacket.execute()) {
context.write(each);
}
context.flush();
}
Aggregations