MCPcopy
hub / github.com/ent/ent / Contains

Method Contains

dialect/sql/builder.go:1323–1325  ·  view source on GitHub ↗

Contains is a helper predicate that checks substring using the LIKE predicate.

(col, substr string)

Source from the content-addressed store, hash-verified

1321
1322// Contains is a helper predicate that checks substring using the LIKE predicate.
1323func (p *Predicate) Contains(col, substr string) *Predicate {
1324 return p.escapedLike(col, "%", "%", substr)
1325}
1326
1327// ContainsFold is a helper predicate that checks substring using the LIKE predicate with case-folding.
1328func ContainsFold(col, sub string) *Predicate { return P().ContainsFold(col, sub) }

Callers 15

TestEntfixFunction · 0.45
migrateFunction · 0.45
UpsertFunction · 0.45
SensitiveFunction · 0.45
NoSchemaChangesFunction · 0.45
LockFunction · 0.45
skipFunction · 0.45
TestSQLiteFunction · 0.45
SanityV1Function · 0.45
SensitiveFunction · 0.45
PredicatesFunction · 0.45
TestSchemaConfigFunction · 0.45

Calls 1

escapedLikeMethod · 0.95

Tested by 15

TestEntfixFunction · 0.36
UpsertFunction · 0.36
SensitiveFunction · 0.36
NoSchemaChangesFunction · 0.36
LockFunction · 0.36
skipFunction · 0.36
TestSQLiteFunction · 0.36
SanityV1Function · 0.36
SensitiveFunction · 0.36
PredicatesFunction · 0.36
TestSchemaConfigFunction · 0.36
TestGraph_GenFunction · 0.36