MCPcopy Create free account
hub / github.com/AfterShip/clickhouse-sql-parser / parseFrameDirectionWithEnd

Method parseFrameDirectionWithEnd

parser/parser_query.go:806–814  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

804}
805
806func (p *Parser) parseFrameDirectionWithEnd() (string, Pos, error) {
807 if !p.matchKeyword(KeywordPreceding) && !p.matchKeyword(KeywordFollowing) {
808 return "", 0, fmt.Errorf("expected PRECEDING or FOLLOWING, got %s", p.lastTokenKind())
809 }
810 endPos := p.End()
811 direction := p.last().String
812 _ = p.lexer.consumeToken()
813 return direction, endPos, nil
814}
815
816func (p *Parser) tryParseWindowClause(pos Pos) (*WindowClause, error) {
817 if !p.matchKeyword(KeywordWindow) {

Callers 3

parseFrameNumberMethod · 0.95
parseFrameParamMethod · 0.95
parseFrameIntervalMethod · 0.95

Calls 5

matchKeywordMethod · 0.95
lastTokenKindMethod · 0.95
EndMethod · 0.95
lastMethod · 0.95
consumeTokenMethod · 0.80

Tested by

no test coverage detected