zrhoffman commented on code in PR #7520:
URL: https://github.com/apache/trafficcontrol/pull/7520#discussion_r1214577522
##########
traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go:
##########
@@ -896,7 +896,19 @@ func (dss *TODSSDeliveryService) Read(h http.Header,
useIMS bool) ([]interface{}
where = "WHERE "
}
- where += "ds.id in (SELECT deliveryService FROM deliveryservice_server
WHERE server = :server) OR ds.id in (SELECT id FROM deliveryservice WHERE
topology in ( SELECT topology FROM topology_cachegroup WHERE cachegroup = (
SELECT name FROM cachegroup WHERE id = ( SELECT cachegroup FROM server WHERE id
= :server ))))"
+ where += `
+ ds.id in (
+ SELECT deliveryService FROM deliveryservice_server
WHERE server = :server
+ ) OR ds.id in (
+ SELECT id FROM deliveryservice
+ WHERE topology in (
+ SELECT topology FROM topology_cachegroup
+ WHERE cachegroup = (
+ SELECT name FROM cachegroup
+ WHERE id = (
+ SELECT cachegroup FROM server
WHERE id = :server
+ ))))
Review Comment:
Queries should not be indented like the rest of the function, because if you
look at the complete, assembled query that Traffic Ops logs, that indentation
does not make sense.
So, the query fragment should be unindented by 2 tabs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]