diff --git a/README.md b/README.md index 43d9069..6d733de 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ gorqlite should be considered alpha until more testers share their experiences. * Support for several rqlite-specific operations: * `Leader()` and `Peers()` to examine the cluster. * `SetConsistencyLevel()` can be called at any time on a connection to change the consistency level for future operations. - * `Timing()` can be called on a per-result basis to retrieve the timings information for executed operations as float64, per the rqlite API. + * `Timing` can be referenced on a per-result basis to retrieve the timings information for executed operations as float64, per the rqlite API. * `Trace(io.Writer)`/`Trace(nil)` can be used to turn on/off debugging information on everything gorqlite does to a io.Writer of your choice. * No external dependencies. Uses only standard library functions. diff --git a/query.go b/query.go index 23923d6..a9a82b6 100644 --- a/query.go +++ b/query.go @@ -167,7 +167,7 @@ func (conn *Connection) Query(sqlStatements []string) (results []QueryResult, er } // time is a float64 - thisQR.timing = thisResult["time"].(float64) + thisQR.Timing = thisResult["time"].(float64) // column & type are an array of strings c := thisResult["columns"].([]interface{}) @@ -186,7 +186,7 @@ func (conn *Connection) Query(sqlStatements []string) (results []QueryResult, er thisQR.rowNumber = -1 - trace("%s: this result (#col,time) %d %f",conn.ID,len(thisQR.columns),thisQR.timing) + trace("%s: this result (#col,time) %d %f",conn.ID,len(thisQR.columns),thisQR.Timing) results = append(results,thisQR) } @@ -221,7 +221,7 @@ type QueryResult struct { Err error columns []string types []string - timing float64 + Timing float64 values []interface{} rowNumber int64 } @@ -394,15 +394,3 @@ func (qr *QueryResult) Types() []string { return qr.types } -/* ***************************************************************** - - method: QueryResult.Timing() - - * *****************************************************************/ - -/* -Timing() returns this QueryResult's execution time, as reported by rqlite. -*/ -func (qr *QueryResult) Timing() float64 { - return qr.timing -}