• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stephenafamo / bob / 28843776727

07 Jul 2026 05:26AM UTC coverage: 47.076% (+0.02%) from 47.059%
28843776727

Pull #715

github

sandonemaki
refactor(gen): inject the generated typed mapper via the table constructor
Pull Request #715: perf(gen): generate typed scan mappers and inject them via the model constructors

26 of 33 new or added lines in 6 files covered. (78.79%)

29 existing lines in 4 files now uncovered.

11688 of 24828 relevant lines covered (47.08%)

709.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/dialect/sqlite/load.go
1
package sqlite
2

3
import (
4
        "github.com/stephenafamo/bob"
5
        "github.com/stephenafamo/bob/dialect/sqlite/dialect"
6
        "github.com/stephenafamo/bob/orm"
7
)
8

9
type (
10
        // Preloader builds a query mod that modifies the original query to retrieve related fields
11
        // while it can be used as a queryMod, it does not have any direct effect.
12
        // if using manually, the ApplyPreload method should be called
13
        // with the query's context AFTER other mods have been applied
14
        Preloader   = orm.Preloader[*dialect.SelectQuery]
15
        PreloadRel  = orm.PreloadRel[Expression]
16
        PreloadSide = orm.PreloadSide[Expression]
17
        // Settings for preloading relationships
18
        PreloadSettings = orm.PreloadSettings[*dialect.SelectQuery]
19
        // Modifies preloading relationships
20
        PreloadOption = orm.PreloadOption[*dialect.SelectQuery]
21
)
22

23
func PreloadOnly(cols ...string) PreloadOption {
×
24
        return orm.PreloadOnly[*dialect.SelectQuery](cols)
×
25
}
×
26

27
func PreloadExcept(cols ...string) PreloadOption {
×
28
        return orm.PreloadExcept[*dialect.SelectQuery](cols)
×
29
}
×
30

31
func PreloadWhere(f ...func(from, to string) []bob.Expression) PreloadOption {
×
32
        return orm.PreloadWhere[*dialect.SelectQuery](f)
×
33
}
×
34

35
func PreloadAs(alias string) PreloadOption {
×
36
        return orm.PreloadAs[*dialect.SelectQuery](alias)
×
37
}
×
38

39
func Preload[T orm.Preloadable, Ts ~[]T](rel orm.PreloadRel[Expression], cols []string, opts ...PreloadOption) Preloader {
×
40
        return orm.Preload[T, Ts](rel, cols, opts...)
×
UNCOV
41
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc