MCPcopy
hub / github.com/XiaoMi/Gaea / Restore

Method Restore

parser/opcode/opcode.go:145–151  ·  view source on GitHub ↗

Restore the Op into a Writer

(ctx *format.RestoreCtx)

Source from the content-addressed store, hash-verified

143
144// Restore the Op into a Writer
145func (o Op) Restore(ctx *format.RestoreCtx) error {
146 if v, ok := opsLiteral[o]; ok {
147 ctx.WriteKeyWord(v)
148 return nil
149 }
150 return errors.Errorf("Invalid opcode type %d during restoring AST to SQL text", o)
151}

Callers

nothing calls this directly

Calls 2

WriteKeyWordMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected