MCPcopy Index your code
hub / github.com/ent/ent / StringHasSuffix

Function StringHasSuffix

dialect/sql/sqljson/sqljson.go:215–221  ·  view source on GitHub ↗

StringHasSuffix return a predicate for checking that a JSON string value (returned by the path) has the given substring as suffix

(column string, suffix string, opts ...Option)

Source from the content-addressed store, hash-verified

213// StringHasSuffix return a predicate for checking that a JSON string value
214// (returned by the path) has the given substring as suffix
215func StringHasSuffix(column string, suffix string, opts ...Option) *sql.Predicate {
216 return sql.P(func(b *sql.Builder) {
217 opts = append([]Option{Unquote(true)}, opts...)
218 valuePath(b, column, opts...)
219 b.Join(sql.HasSuffix("", suffix))
220 })
221}
222
223// StringContains return a predicate for checking that a JSON string value
224// (returned by the path) contains the given substring

Callers 2

PredicatesFunction · 0.92
TestWritePathFunction · 0.92

Calls 5

PStruct · 0.92
HasSuffixFunction · 0.92
UnquoteFunction · 0.85
valuePathFunction · 0.85
JoinMethod · 0.45

Tested by 2

PredicatesFunction · 0.74
TestWritePathFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…