ExecuteSelectStreaming will call perRowCallback for every row in resultset WITHOUT saving any row data to Result.{Values/RawPkg/RowDatas} fields. ExecuteSelectStreaming should be used only for SELECT queries with a large response resultset for memory preserving. Example: var result mysql.Res
(command string, result *Result, perRowCallback SelectPerRowCallback)
| 198 | // return nil |
| 199 | // }) |
| 200 | func (c *Conn) ExecuteSelectStreaming(command string, result *Result, perRowCallback SelectPerRowCallback) error { |
| 201 | if err := c.writeCommandStr(COM_QUERY, command); err != nil { |
| 202 | return errors.Trace(err) |
| 203 | } |
| 204 | |
| 205 | return c.readResultStreaming(false, result, perRowCallback) |
| 206 | } |
| 207 | |
| 208 | func (c *Conn) Begin() error { |
| 209 | _, err := c.exec("BEGIN") |
nothing calls this directly
no test coverage detected