// CancelQuery stops a running query based on its ID.
// It returns true whether it was cancelled otherwise false or/and error.
CancelQuery stops a running query based on its ID.
It returns true whether it was cancelled otherwise false or/and error.
// CancelQuery stops a running query based on its ID . // It returns true whether it was cancelled otherwise false or / and error .
func (c *Client) CancelQuery(id int64) (bool, error) {
	path := fmt.Sprintf(queriesPath+"/%d", id)
	resp, err := c.Do(http.MethodDelete, path, "", nil)
	if err != nil {
		return false, err
	}
	var canceled bool
	err = c.ReadJSON(resp, &canceled)
	return canceled, err
}
func ( c * Client ) CancelQuery ( id int64 ) ( bool , error ) { path := fmt . Sprintf ( queriesPath + " " , id ) resp , err := c . Do ( http . MethodDelete , path , " " , nil ) if err != nil { return false , err } var canceled bool err = c . ReadJSON ( resp , & canceled ) return canceled , err }
CancelQuery stops a running query based on its ID.
CancelQuery stops a running query based on its ID .