ConvertAssignRow copies a row of values in the list of destinations. An error is returned if any one of the row's element coping is done between incompatible value and dest types. The list of destinations must contain pointers. Note that for anything else than *[]byte the value is copied, however
(row []Value, dest ...interface{})
| 299 | // the destination is of type *[]byte it will point the same []byte array as |
| 300 | // the source (no copying). |
| 301 | func ConvertAssignRow(row []Value, dest ...interface{}) error { |
| 302 | if len(row) != len(dest) { |
| 303 | return errors.Newf( |
| 304 | "# of row entries %d does not match # of destinations %d", |
| 305 | len(row), |
| 306 | len(dest)) |
| 307 | } |
| 308 | |
| 309 | for i := 0; i < len(row); i++ { |
| 310 | err := ConvertAssign(row[i], dest[i]) |
| 311 | if err != nil { |
| 312 | return err |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | return nil |
| 317 | } |
| 318 | |
| 319 | // ConvertAssign copies to the '*dest' the value in 'src'. An error is returned |
| 320 | // if the coping is done between incompatible Value and dest types. 'dest' must be |