MCPcopy Create free account
hub / github.com/araddon/qlbridge / Run

Method Run

exec/command.go:47–67  ·  view source on GitHub ↗

Run Command

()

Source from the content-addressed store, hash-verified

45
46// Run Command
47func (m *Command) Run() error {
48 //defer m.Ctx.Recover()
49 defer close(m.msgOutCh)
50
51 if m.Ctx.Session == nil {
52 u.Warnf("no Context.Session?")
53 return fmt.Errorf("no Context.Session?")
54 }
55
56 switch kw := m.p.Stmt.Keyword(); kw {
57 case lex.TokenSet:
58 return m.runSet()
59 case lex.TokenRollback, lex.TokenCommit:
60 u.Debugf("ignorning transaction, not implemented. %v", kw.String())
61 return nil
62 default:
63 u.Warnf("unrecognized command: kw=%v stmt:%s", kw, m.p.Stmt)
64 }
65 return ErrNotImplemented
66
67}
68func (m *Command) runSet() error {
69
70 writeContext, ok := m.Ctx.Session.(expr.ContextWriter)

Callers

nothing calls this directly

Calls 4

runSetMethod · 0.95
ErrorfMethod · 0.80
KeywordMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected