Fetch loads row data from `cursor` into `dst`
(cursor dal.Rows, dst interface{})
| 196 | |
| 197 | // Fetch loads row data from `cursor` into `dst` |
| 198 | func (d *Dalgorm) Fetch(cursor dal.Rows, dst interface{}) errors.Error { |
| 199 | if rows, ok := cursor.(*sql.Rows); ok { |
| 200 | return d.convertGormError(d.db.ScanRows(rows, dst)) |
| 201 | } else { |
| 202 | return errors.Default.New(fmt.Sprintf("can not support type %s to be a dal.Rows interface", reflect.TypeOf(cursor).String())) |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | // All loads matched rows from database to `dst`, USE IT WITH COUTIOUS!! |
| 207 | func (d *Dalgorm) All(dst interface{}, clauses ...dal.Clause) errors.Error { |
nothing calls this directly
no test coverage detected