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

Method Insert

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

Source from the content-addressed store, hash-verified

41}
42
43func (sqlboiler *Sqlboiler) Insert(b *testing.B) {
44 m := NewModel6()
45
46 b.ReportAllocs()
47 b.ResetTimer()
48
49 for i := 0; i < b.N; i++ {
50 m.ID = 0
51 err := m.Insert(ctx, sqlboiler.conn, boil.Infer())
52 if err != nil {
53 helper.SetError(b, sqlboiler.Name(), "Insert", err.Error())
54 }
55 }
56}
57
58func (sqlboiler *Sqlboiler) InsertMulti(b *testing.B) {
59 helper.SetError(b, sqlboiler.Name(), "InsertMulti", "bulk-insert is not supported")

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected