MCPcopy
hub / github.com/ent/ent / ColumnsOp

Method ColumnsOp

dialect/sql/builder.go:821–827  ·  view source on GitHub ↗

ColumnsOp appends the given predicate between 2 columns.

(col1, col2 string, op Op)

Source from the content-addressed store, hash-verified

819
820// ColumnsOp appends the given predicate between 2 columns.
821func (p *Predicate) ColumnsOp(col1, col2 string, op Op) *Predicate {
822 return p.Append(func(b *Builder) {
823 b.Ident(col1)
824 b.WriteOp(op)
825 b.Ident(col2)
826 })
827}
828
829// And combines all given predicates with AND between them.
830func And(preds ...*Predicate) *Predicate {

Callers 7

ColumnsEQMethod · 0.95
ColumnsNEQMethod · 0.95
ColumnsLTMethod · 0.95
ColumnsLTEMethod · 0.95
ColumnsGTMethod · 0.95
ColumnsGTEMethod · 0.95
ColumnsOpFunction · 0.80

Calls 3

AppendMethod · 0.95
IdentMethod · 0.80
WriteOpMethod · 0.80

Tested by

no test coverage detected