MCPcopy
hub / github.com/ent/ent / HasSuffix

Method HasSuffix

dialect/sql/builder.go:1280–1282  ·  view source on GitHub ↗

HasSuffix is a helper predicate that checks suffix using the LIKE predicate.

(col, suffix string)

Source from the content-addressed store, hash-verified

1278
1279// HasSuffix is a helper predicate that checks suffix using the LIKE predicate.
1280func (p *Predicate) HasSuffix(col, suffix string) *Predicate {
1281 return p.escapedLike(col, "%", "", suffix)
1282}
1283
1284// HasSuffixFold is a helper predicate that checks suffix using the ILIKE predicate.
1285func HasSuffixFold(col, suffix string) *Predicate { return P().HasSuffixFold(col, suffix) }

Callers 7

TestEntfixFunction · 0.80
OrderNameMethod · 0.80
cleanOldNodesFunction · 0.80
ParseDirMethod · 0.80
HasSuffixFunction · 0.80
IdentMethod · 0.80
ExecMethod · 0.80

Calls 1

escapedLikeMethod · 0.95

Tested by 1

TestEntfixFunction · 0.64