Documentation ¶
Index ¶
- Constants
- func Lex(input io.ReaderAt) (*lexer, chan LexItem)
- func LexSection(input io.ReaderAt, off, n int64) (*lexer, chan LexItem)
- func StartState(l *lexer) state
- type InsertDetailParser
- type Intp
- type LexItem
- type Parser
- type Query
- type QueryParser
- type QueryTree
- type SummaryColumn
- type SummaryDataLoc
- type SummaryParser
- type SummaryTable
- type SummaryTree
Constants ¶
View Source
const ( TIllegal lexItemType = iota TEof TSemi TComma TComment TDelim TNull TString TNumber TIdentifier TDropTableFullStmt TLockTableFullStmt TUnlockTablesFullStmt TSetFullStmt TLParen TRParen TCreateTable TCreateTableDetail TcreateTableExtraDetail TColumnType TColumnSize TColumnEnumVal TColumnDetails TInsertInto TInsertValues // Values Below Are Specific to the interpreter TIntpSelect TIntpStar TIntpFrom TIntpIntoOutfile TIntpShowTables TIntpShowColumns TIntpShowCreateTable TIntpQuit )
Variables ¶
This section is empty.
Functions ¶
func StartState ¶
func StartState(l *lexer) state
Types ¶
type InsertDetailParser ¶
func NewInsertDetailParser ¶
func NewInsertDetailParser() *InsertDetailParser
func (*InsertDetailParser) ParseStart ¶
func (d *InsertDetailParser) ParseStart(p *Parser) parseState
type Intp ¶
type Intp struct {
EOF bool
}
func (*Intp) StartIntpState ¶
func (intp *Intp) StartIntpState(l *lexer) state
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is a state based SQL Parser that reads LexItems on a channel
type QueryParser ¶
type QueryParser struct {
Tree QueryTree
}
func NewQueryParser ¶
func NewQueryParser() *QueryParser
func (*QueryParser) ParseStart ¶
func (q *QueryParser) ParseStart(p *Parser) parseState
type SummaryColumn ¶
type SummaryDataLoc ¶
type SummaryParser ¶
type SummaryParser struct {
Tree SummaryTree
}
func NewSummaryParser ¶
func NewSummaryParser() *SummaryParser
func (*SummaryParser) ParseStart ¶
func (t *SummaryParser) ParseStart(p *Parser) parseState
type SummaryTable ¶
type SummaryTable struct { Create LexItem Cols []SummaryColumn DataLocs []SummaryDataLoc SummaryDataLoc }
type SummaryTree ¶
type SummaryTree map[string]SummaryTable
Source Files ¶
Click to show internal directories.
Click to hide internal directories.