Esempio n. 1
0
func (dc *DBClient) ExecuteFetch(query string, maxrows int, wantfields bool) (*proto.QueryResult, error) {
	mqr, err := dc.dbConn.ExecuteFetch(query, maxrows, wantfields)
	if err != nil {
		log.Errorf("ExecuteFetch failed w/ error %v", err)
		dc.handleError(err)
		return nil, err
	}
	qr := proto.QueryResult(*mqr)
	return &qr, nil
}
Esempio n. 2
0
func (dbc *DBConnection) ExecuteFetch(query string, maxrows int, wantfields bool) (*proto.QueryResult, error) {
	start := time.Now()
	mqr, err := dbc.Connection.ExecuteFetch(query, maxrows, wantfields)
	if err != nil {
		mysqlStats.Record("Exec", start)
		dbc.handleError(err)
		return nil, err
	}
	mysqlStats.Record("Exec", start)
	qr := proto.QueryResult(*mqr)
	return &qr, nil
}