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

Method parseJSONPath

parser/parser_column.go:1043–1061  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1041}
1042
1043func (p *Parser) parseJSONPath() (*JSONPath, error) {
1044 idents := make([]*Ident, 0)
1045 ident, err := p.parseIdent()
1046 if err != nil {
1047 return nil, err
1048 }
1049 idents = append(idents, ident)
1050
1051 for !p.lexer.isEOF() && p.tryConsumeTokenKind(TokenKindDot) != nil {
1052 ident, err := p.parseIdent()
1053 if err != nil {
1054 return nil, err
1055 }
1056 idents = append(idents, ident)
1057 }
1058 return &JSONPath{
1059 Idents: idents,
1060 }, nil
1061}
1062
1063func (p *Parser) parseJSONMaxDynamicOptions(pos Pos) (*JSONOption, error) {
1064 ident, err := p.parseIdent()

Callers 1

parseJSONOptionMethod · 0.95

Calls 3

parseIdentMethod · 0.95
tryConsumeTokenKindMethod · 0.95
isEOFMethod · 0.80

Tested by

no test coverage detected