Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 3946 | |
| 3947 | // Format implements the NodeFormatter interface. |
| 3948 | func (d *DJsonpath) Format(ctx *FmtCtx) { |
| 3949 | buf, f := &ctx.Buffer, ctx.flags |
| 3950 | if f.HasFlags(fmtRawStrings) || f.HasFlags(fmtPgwireFormat) { |
| 3951 | buf.WriteString(d.Jsonpath.String()) |
| 3952 | } else { |
| 3953 | lexbase.EncodeSQLStringWithFlags(buf, d.Jsonpath.String(), f.EncodeFlags()) |
| 3954 | } |
| 3955 | } |
| 3956 | |
| 3957 | func ParseDJsonpath(s string) (Datum, error) { |
| 3958 | jp, err := ValidateJSONPath(s) |
nothing calls this directly
no test coverage detected