MCPcopy Create free account
hub / github.com/pydio/cells / Build

Method Build

common/proto/tree/node.go:739–763  ·  view source on GitHub ↗
(builder clause.Builder)

Source from the content-addressed store, hash-verified

737}
738
739func (me MPathEquals) Build(builder clause.Builder) {
740 var expr []clause.Expression
741
742 if mpath1 := me.Value.GetMPath1(); mpath1 != "" {
743 expr = append(expr, clause.Eq{Column: "mpath1", Value: me.Value.GetMPath1()})
744 }
745
746 if mpath2 := me.Value.GetMPath2(); mpath2 != "" {
747 expr = append(expr, clause.Eq{Column: "mpath2", Value: me.Value.GetMPath2()})
748 }
749
750 if mpath3 := me.Value.GetMPath3(); mpath3 != "" {
751 expr = append(expr, clause.Eq{Column: "mpath3", Value: me.Value.GetMPath3()})
752 }
753
754 if mpath4 := me.Value.GetMPath4(); mpath4 != "" {
755 expr = append(expr, clause.Eq{Column: "mpath4", Value: me.Value.GetMPath4()})
756 }
757
758 expr = append(expr, clause.Eq{Column: "level", Value: me.Value.Length()})
759
760 if len(expr) > 0 {
761 clause.And(expr...).Build(builder)
762 }
763}
764
765// MPathLike greater than for where
766type MPathLike struct {

Callers

nothing calls this directly

Calls 7

LengthMethod · 0.80
GetMPath1Method · 0.65
GetMPath2Method · 0.65
GetMPath3Method · 0.65
GetMPath4Method · 0.65
BuildMethod · 0.65
AndMethod · 0.65

Tested by

no test coverage detected