Adds the ability to set the connection being used when using the Query object. Related to #365