Przeglądaj źródła

store the host that executed the query on the returned Iter

Chris Bannister 10 lat temu
rodzic
commit
cba539920e
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      session.go

+ 6 - 0
session.go

@@ -847,11 +847,17 @@ type Iter struct {
 	rows [][][]byte
 	meta resultMetadata
 	next *nextIter
+	host *HostInfo
 
 	framer *framer
 	once   sync.Once
 }
 
+// Host returns the host which the query was sent to.
+func (iter *Iter) Host() *HostInfo {
+	return iter.host
+}
+
 // Columns returns the name and type of the selected columns.
 func (iter *Iter) Columns() []ColumnInfo {
 	return iter.meta.columns