MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Convert

Method Convert

server/plpgsql/json.go:710–722  ·  view source on GitHub ↗

Convert converts the JSON statement into its output form.

()

Source from the content-addressed store, hash-verified

708
709// Convert converts the JSON statement into its output form.
710func (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.
725func (stmt *plpgSQL_stmt_perform) Convert() Perform {

Callers

nothing calls this directly

Calls 2

jsonConvertStatementsFunction · 0.85

Tested by

no test coverage detected