MCPcopy
hub / github.com/ent/ent / Cast

Function Cast

dialect/sql/sqljson/sqljson.go:445–449  ·  view source on GitHub ↗

Cast indicates that the result value should be cast to the given type. ValuePath(b, "column", Path("a", "b", "[1]", "c"), Cast("int"))

(typ string)

Source from the content-addressed store, hash-verified

443//
444// ValuePath(b, "column", Path("a", "b", "[1]", "c"), Cast("int"))
445func Cast(typ string) Option {
446 return func(p *PathOptions) {
447 p.Cast = typ
448 }
449}
450
451// PathOptions holds the options for accessing a JSON value from an identifier.
452type PathOptions struct {

Callers 5

TestWritePathFunction · 0.92
ValueIsNullFunction · 0.85
ValueIsNotNullFunction · 0.85
normalizePGFunction · 0.85
AppendMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestWritePathFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…