MCPcopy
hub / github.com/go-gorm/gorm / NameIn

Function NameIn

tests/scopes_test.go:19–23  ·  view source on GitHub ↗
(names []string)

Source from the content-addressed store, hash-verified

17}
18
19func NameIn(names []string) func(d *gorm.DB) *gorm.DB {
20 return func(d *gorm.DB) *gorm.DB {
21 return d.Where("name in (?)", names)
22 }
23}
24
25func TestScopes(t *testing.T) {
26 users := []*User{

Callers 1

TestScopesFunction · 0.85

Calls 1

WhereMethod · 0.65

Tested by

no test coverage detected