MCPcopy Index your code
hub / github.com/donatj/sqlread / parseShowColumns

Method parseShowColumns

query.go:100–124  ·  view source on GitHub ↗
(p *Parser)

Source from the content-addressed store, hash-verified

98}
99
100func (q *QueryParser) parseShowColumns(p *Parser) parseState {
101 x, ok := p.scan()
102 if !ok {
103 p.errorUnexpectedEOF()
104 return nil
105 }
106 if !isOfAny(x, TIntpFrom) {
107 p.errorUnexpectedLex(x, TIntpFrom)
108 return nil
109 }
110
111 y, ok := p.scan()
112 if !ok {
113 p.errorUnexpectedEOF()
114 return nil
115 }
116 if !isOfAny(y, TIdentifier) {
117 p.errorUnexpectedLex(y, TIdentifier)
118 return nil
119 }
120
121 q.Tree.ShowColumns = append(q.Tree.ShowColumns, identValue(y))
122
123 return q.ParseStart
124}
125
126func (q *QueryParser) parseShowCreateTable(p *Parser) parseState {
127 y, ok := p.scan()

Callers

nothing calls this directly

Calls 5

isOfAnyFunction · 0.85
identValueFunction · 0.85
scanMethod · 0.80
errorUnexpectedEOFMethod · 0.80
errorUnexpectedLexMethod · 0.80

Tested by

no test coverage detected