@@ -217,11 +217,10 @@ func (c *Conn) Execute(command string, args ...interface{}) (*Result, error) {
217
217
//
218
218
// Example:
219
219
//
220
- // queries := "SELECT 1; SELECT NOW();"
221
- // conn.ExecuteMultiple(queries, func(result *mysql.Result, err error) {
222
- // // Use the result as you want
223
- // })
224
- //
220
+ // queries := "SELECT 1; SELECT NOW();"
221
+ // conn.ExecuteMultiple(queries, func(result *mysql.Result, err error) {
222
+ // // Use the result as you want
223
+ // })
225
224
func (c * Conn ) ExecuteMultiple (query string , perResultCallback ExecPerResultCallback ) (* Result , error ) {
226
225
if err := c .writeCommandStr (COM_QUERY , query ); err != nil {
227
226
return nil , errors .Trace (err )
@@ -271,20 +270,19 @@ func (c *Conn) ExecuteMultiple(query string, perResultCallback ExecPerResultCall
271
270
}
272
271
273
272
// ExecuteSelectStreaming will call perRowCallback for every row in resultset
274
- // WITHOUT saving any row data to Result.{Values/RawPkg/RowDatas} fields.
273
+ // WITHOUT saving any row data to Result.{Values/RawPkg/RowDatas} fields.
275
274
// When given, perResultCallback will be called once per result
276
275
//
277
276
// ExecuteSelectStreaming should be used only for SELECT queries with a large response resultset for memory preserving.
278
277
//
279
278
// Example:
280
279
//
281
- // var result mysql.Result
282
- // conn.ExecuteSelectStreaming(`SELECT ... LIMIT 100500`, &result, func(row []mysql.FieldValue) error {
283
- // // Use the row as you want.
284
- // // You must not save FieldValue.AsString() value after this callback is done. Copy it if you need.
285
- // return nil
286
- // }, nil)
287
- //
280
+ // var result mysql.Result
281
+ // conn.ExecuteSelectStreaming(`SELECT ... LIMIT 100500`, &result, func(row []mysql.FieldValue) error {
282
+ // // Use the row as you want.
283
+ // // You must not save FieldValue.AsString() value after this callback is done. Copy it if you need.
284
+ // return nil
285
+ // }, nil)
288
286
func (c * Conn ) ExecuteSelectStreaming (command string , result * Result , perRowCallback SelectPerRowCallback , perResultCallback SelectPerResultCallback ) error {
289
287
if err := c .writeCommandStr (COM_QUERY , command ); err != nil {
290
288
return errors .Trace (err )
0 commit comments