Method
Format
(buf *TrackedBuffer, d format.Dialect)
Source from the content-addressed store, hash-verified
| 11 | } |
| 12 | |
| 13 | func (n *DoStmt) Format(buf *TrackedBuffer, d format.Dialect) { |
| 14 | if n == nil { |
| 15 | return |
| 16 | } |
| 17 | buf.WriteString("DO ") |
| 18 | // Find the "as" argument which contains the body |
| 19 | if items(n.Args) { |
| 20 | for _, arg := range n.Args.Items { |
| 21 | if de, ok := arg.(*DefElem); ok && de.Defname != nil && *de.Defname == "as" { |
| 22 | if s, ok := de.Arg.(*String); ok { |
| 23 | buf.WriteString("$$") |
| 24 | buf.WriteString(s.Str) |
| 25 | buf.WriteString("$$") |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected