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

Method mysqlFunc

dialect/sql/sqljson/sqljson.go:548–553  ·  view source on GitHub ↗

mysqlFunc writes the JSON path in MySQL format for the given function. `JSON_EXTRACT("a", '$.b.c')`.

(fn string, b *sql.Builder)

Source from the content-addressed store, hash-verified

546// mysqlFunc writes the JSON path in MySQL format for the
547// given function. `JSON_EXTRACT("a", '$.b.c')`.
548func (p *PathOptions) mysqlFunc(fn string, b *sql.Builder) {
549 b.WriteString(fn).WriteByte('(')
550 b.Ident(p.Ident).Comma()
551 p.mysqlPath(b)
552 b.WriteByte(')')
553}
554
555// mysqlPath writes the JSON path in MySQL (or SQLite) format.
556func (p *PathOptions) mysqlPath(b *sql.Builder) {

Callers 5

valueMethod · 0.95
lengthMethod · 0.95
HasKeyFunction · 0.80
ValueIsNullFunction · 0.80
ValueIsNotNullFunction · 0.80

Calls 5

mysqlPathMethod · 0.95
WriteByteMethod · 0.80
WriteStringMethod · 0.80
CommaMethod · 0.80
IdentMethod · 0.80

Tested by

no test coverage detected