Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 169 | |
| 170 | // Format implements the NodeFormatter interface. |
| 171 | func (c CursorStmt) Format(ctx *FmtCtx) { |
| 172 | fetchType := c.FetchType.String() |
| 173 | if fetchType != "" { |
| 174 | ctx.WriteString(fetchType) |
| 175 | ctx.WriteString(" ") |
| 176 | } |
| 177 | if c.FetchType.HasCount() { |
| 178 | if ctx.HasFlags(FmtHideConstants) { |
| 179 | ctx.WriteByte('0') |
| 180 | } else { |
| 181 | ctx.WriteString(strconv.Itoa(int(c.Count))) |
| 182 | } |
| 183 | ctx.WriteString(" ") |
| 184 | } |
| 185 | ctx.FormatNode(&c.Name) |
| 186 | } |
| 187 | |
| 188 | // Format implements the NodeFormatter interface. |
| 189 | func (f FetchCursor) Format(ctx *FmtCtx) { |
nothing calls this directly
no test coverage detected