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

Function And

clause/where.go:103–115  ·  view source on GitHub ↗
(exprs ...Expression)

Source from the content-addressed store, hash-verified

101}
102
103func And(exprs ...Expression) Expression {
104 if len(exprs) == 0 {
105 return nil
106 }
107
108 if len(exprs) == 1 {
109 if _, ok := exprs[0].(OrConditions); !ok {
110 return exprs[0]
111 }
112 }
113
114 return AndConditions{Exprs: exprs}
115}
116
117type AndConditions struct {
118 Exprs []Expression

Callers 4

OrMethod · 0.92
BuildConditionMethod · 0.92
ModifyStatementMethod · 0.92
TestWhereFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestWhereFunction · 0.74