code: func (sink *influxdbSink) runQuery(queryStr string) ([]influxdb.Result, error) {
  	// ensure we have a valid client handle before attempting to use it
  	if err := sink.ensureClient(); err != nil {
  		glog.Errorf("Unable to ensure InfluxDB client is present: %v", err)
  		return nil, fmt.Errorf("unable to run query: unable to connect to database")
  	}
  
  	q := influxdb.Query{
  		Command:  queryStr,
  		Database: sink.c.DbName,
  	}
  
  	glog.V(4).Infof("Executing query %q against database %q", q.Command, q.Database)
  
  	resp, err := sink.client.Query(q)
  	if err != nil {
  		glog.Errorf("Unable to perform query %q against database %q: %v", q.Command, q.Database, err)
  		return nil, err
  	} else if resp.Error() != nil {
  		glog.Errorf("Unable to perform query %q against database %q: %v", q.Command, q.Database, resp.Error())
  		return nil, resp.Error()
  	}
  
  	if len(resp.Results) < 1 {
  		glog.Errorf("Unable to perform query %q against database %q: no results returned", q.Command, q.Database)
  		return nil, fmt.Errorf("No results returned")
  	}
  
  	return resp.Results, nil
  }
docs: // runQuery executes the given query against InfluxDB (using the default database for this sink)
  // The caller is responsible for locking the sink before use.