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

Method First

backend/impls/dalgorm/dalgorm.go:213–216  ·  view source on GitHub ↗

First loads first matched row from database to `dst`, error will be returned if no records were found

(dst interface{}, clauses ...dal.Clause)

Source from the content-addressed store, hash-verified

211
212// First loads first matched row from database to `dst`, error will be returned if no records were found
213func (d *Dalgorm) First(dst interface{}, clauses ...dal.Clause) errors.Error {
214 d.unwrapDynamic(&dst, &clauses)
215 return d.convertGormError(buildTx(d.db, clauses).First(dst).Error)
216}
217
218// Count total records
219func (d *Dalgorm) Count(clauses ...dal.Clause) (int64, errors.Error) {

Callers 1

AutoMigrateMethod · 0.95

Calls 4

unwrapDynamicMethod · 0.95
convertGormErrorMethod · 0.95
buildTxFunction · 0.85
FirstMethod · 0.65

Tested by

no test coverage detected