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

Method parseShowFromDatabase

rel/parse_sql.go:2091–2106  ·  view source on GitHub ↗
(req *SqlShow)

Source from the content-addressed store, hash-verified

2089}
2090
2091func (m *Sqlbridge) parseShowFromDatabase(req *SqlShow) error {
2092
2093 switch m.Cur().T {
2094 case lex.TokenFrom, lex.TokenIN:
2095 m.Next() // Consume {FROM | IN}
2096 default:
2097 // this is optional
2098 return nil
2099 }
2100
2101 if m.Cur().T != lex.TokenIdentity {
2102 return fmt.Errorf("Expected { FROM | IN } IDENTITY for SHOW")
2103 }
2104 req.Db = m.Next().V
2105 return nil
2106}
2107
2108func ParseJsonObject(pg expr.TokenPager, jh u.JsonHelper) error {
2109 if pg.Cur().T != lex.TokenLeftBrace {

Callers 1

parseShowMethod · 0.95

Calls 3

ErrorfMethod · 0.80
CurMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected