class ShardingCTLShowBackendHandler implements TextProtocolBackendHandler {

    @Override
    public BackendResponse execute() {
        Optional<ShardingCTLShowStatement> showStatement = new ShardingCTLShowParser(sql).doParse();
        if (!showStatement.isPresent()) {
            throw new InvalidShardingCTLFormatException(sql);
        }
        switch (showStatement.get().getValue()) {
            case "TRANSACTION_TYPE":
                return createResponsePackets("TRANSACTION_TYPE", backendConnection.getTransactionStatus().getTransactionType().name());
            case "CACHED_CONNECTIONS":
                return createResponsePackets("CACHED_CONNECTIONS", backendConnection.getConnectionSize());
            default:
                throw new UnsupportedShardingCTLTypeException(sql);
        }
    }

    public  ShardingCTLShowBackendHandler(final String sql, final BackendConnection backendConnection);

}