MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Format

Method Format

pkg/sql/sem/tree/txn.go:104–122  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

102
103// Format implements the NodeFormatter interface.
104func (node *TransactionModes) Format(ctx *FmtCtx) {
105 var sep string
106 if node.Isolation != UnspecifiedIsolation {
107 ctx.Printf(" ISOLATION LEVEL %s", node.Isolation)
108 sep = ","
109 }
110 if node.UserPriority != UnspecifiedUserPriority {
111 ctx.Printf("%s PRIORITY %s", sep, node.UserPriority)
112 sep = ","
113 }
114 if node.ReadWriteMode != UnspecifiedReadWriteMode {
115 ctx.Printf("%s READ %s", sep, node.ReadWriteMode)
116 }
117 if node.AsOf.Expr != nil {
118 ctx.WriteString(sep)
119 ctx.WriteString(" ")
120 node.AsOf.Format(ctx)
121 }
122}
123
124var (
125 errIsolationLevelSpecifiedMultipleTimes = pgerror.New(pgcode.Syntax, "isolation level specified multiple times")

Callers

nothing calls this directly

Calls 2

PrintfMethod · 0.80
FormatMethod · 0.65

Tested by

no test coverage detected