MCPcopy Index your code
hub / github.com/Masterminds/structable / loadFromSql

Method loadFromSql

sqlite_pod_test.go:30–40  ·  view source on GitHub ↗
(Id int64, db *sql.DB)

Source from the content-addressed store, hash-verified

28}
29
30func (l *Language) loadFromSql(Id int64, db *sql.DB) error {
31
32 err := db.QueryRow("SELECT name, version, dt_release FROM languages WHERE id=?", Id).Scan(
33 &l.Name,
34 &l.Version,
35 &l.DtRelease)
36 if err == nil {
37 l.Id = Id
38 }
39 return err
40}
41
42func TestPlainStructInsert(t *testing.T) {
43

Callers 2

TestPlainStructInsertFunction · 0.45
TestPlainStructUpdateFunction · 0.45

Calls 2

ScanMethod · 0.80
QueryRowMethod · 0.80

Tested by

no test coverage detected