MCPcopy Create free account
hub / github.com/apache/devlake / Fetch

Method Fetch

backend/impls/dalgorm/dalgorm.go:198–204  ·  view source on GitHub ↗

Fetch loads row data from `cursor` into `dst`

(cursor dal.Rows, dst interface{})

Source from the content-addressed store, hash-verified

196
197// Fetch loads row data from `cursor` into `dst`
198func (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!!
207func (d *Dalgorm) All(dst interface{}, clauses ...dal.Clause) errors.Error {

Callers

nothing calls this directly

Calls 3

convertGormErrorMethod · 0.95
NewMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected