MCPcopy
hub / github.com/go-sql-driver/mysql / Close

Method Close

rows.go:100–127  ·  rows.go::mysqlRows.Close
()

Source from the content-addressed store, hash-verified

98}
99
100func (rows *mysqlRows) Close() (err error) {
101 if f := rows.finish; f != nil {
102 f()
103 rows.finish = nil
104 }
105
106 mc := rows.mc
107 if mc == nil {
108 return nil
109 }
110 if err := mc.error(); err != nil {
111 return err
112 }
113
114 // Remove unread packets from stream
115 if !rows.rs.done {
116 err = mc.skipRows()
117 }
118 if err == nil {
119 handleOk := mc.clearResult()
120 if err = handleOk.discardResults(); err != nil {
121 return err
122 }
123 }
124
125 rows.mc = nil
126 return err
127}
128
129func (rows *mysqlRows) HasNextResultSet() (b bool) {
130 if rows.mc == nil {

Callers 14

deferredCloseFunction · 0.45
zDecompressFunction · 0.45
zCompressFunction · 0.45
benchmarkQueryFunction · 0.45
BenchmarkExecFunction · 0.45
BenchmarkRoundtripTxtFunction · 0.45
BenchmarkRoundtripBinFunction · 0.45
benchmarkQueryContextFunction · 0.45
BenchmarkQueryContextFunction · 0.45
benchmarkExecContextFunction · 0.45
BenchmarkExecContextFunction · 0.45
BenchmarkQueryRawBytesFunction · 0.45

Calls 4

errorMethod · 0.80
skipRowsMethod · 0.80
clearResultMethod · 0.80
discardResultsMethod · 0.80

Tested by 11

benchmarkQueryFunction · 0.36
BenchmarkExecFunction · 0.36
BenchmarkRoundtripTxtFunction · 0.36
BenchmarkRoundtripBinFunction · 0.36
benchmarkQueryContextFunction · 0.36
BenchmarkQueryContextFunction · 0.36
benchmarkExecContextFunction · 0.36
BenchmarkExecContextFunction · 0.36
BenchmarkQueryRawBytesFunction · 0.36
benchmark10kRowsFunction · 0.36
BenchmarkReceiveMetadataFunction · 0.36