Convert converts the JSON statement into its output form.
()
| 708 | |
| 709 | // Convert converts the JSON statement into its output form. |
| 710 | func (stmt *plpgSQL_stmt_loop) Convert() (block Block, err error) { |
| 711 | // Set the block's label if one was provided |
| 712 | block.Label = stmt.Label |
| 713 | block.IsLoop = true |
| 714 | // Convert the body of the loop first so we can determine the GOTO offset |
| 715 | block.Body, err = jsonConvertStatements(stmt.Body) |
| 716 | if err != nil { |
| 717 | return Block{}, err |
| 718 | } |
| 719 | // The loop returns to the beginning of the loop, skipping the body |
| 720 | block.Body = append(block.Body, Goto{Offset: -OperationSizeForStatements(block.Body)}) |
| 721 | return block, nil |
| 722 | } |
| 723 | |
| 724 | // Convert converts the JSON statement into its output form. |
| 725 | func (stmt *plpgSQL_stmt_perform) Convert() Perform { |
nothing calls this directly
no test coverage detected