MCPcopy
hub / github.com/ent/ent / ValuePath

Function ValuePath

dialect/sql/sqljson/sqljson.go:480–484  ·  view source on GitHub ↗

ValuePath returns an SQL expression for getting the JSON value of a column with an optional path and cast options. sqljson.ValueEQ( column, sqljson.ValuePath(column, Path("a"), Cast("int")), sqljson.Path("a"), )

(column string, opts ...Option)

Source from the content-addressed store, hash-verified

478// sqljson.Path("a"),
479// )
480func ValuePath(column string, opts ...Option) sql.Querier {
481 return sql.ExprFunc(func(b *sql.Builder) {
482 valuePath(b, column, opts...)
483 })
484}
485
486// OrderValue returns a custom predicate function (as defined in the doc),
487// that sets the result order by the given JSON value.

Callers 3

TestWritePathFunction · 0.92
OrderValueFunction · 0.85
OrderValueDescFunction · 0.85

Calls 2

ExprFuncFunction · 0.92
valuePathFunction · 0.85

Tested by 1

TestWritePathFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…