MCPcopy Create free account
hub / github.com/efectn/go-orm-benchmarks / Update

Method Update

bench/sqlboiler.go:62–79  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

60}
61
62func (sqlboiler *Sqlboiler) Update(b *testing.B) {
63 m := NewModel6()
64 m.ID = 0
65 err := m.Insert(ctx, sqlboiler.conn, boil.Infer())
66 if err != nil {
67 helper.SetError(b, sqlboiler.Name(), "Update", err.Error())
68 }
69
70 b.ReportAllocs()
71 b.ResetTimer()
72
73 for i := 0; i < b.N; i++ {
74 _, err := m.Update(ctx, sqlboiler.conn, boil.Infer())
75 if err != nil {
76 helper.SetError(b, sqlboiler.Name(), "Update", err.Error())
77 }
78 }
79}
80
81func (sqlboiler *Sqlboiler) Read(b *testing.B) {
82 m := NewModel6()

Callers

nothing calls this directly

Calls 6

NameMethod · 0.95
SetErrorFunction · 0.92
NewModel6Function · 0.85
InsertMethod · 0.65
ErrorMethod · 0.65
UpdateMethod · 0.65

Tested by

no test coverage detected