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

Method tryParseIfExists

parser/parser_common.go:205–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203}
204
205func (p *Parser) tryParseIfExists() (bool, error) {
206 if !p.tryConsumeKeywords(KeywordIf) {
207 return false, nil
208 }
209
210 if err := p.expectKeyword(KeywordExists); err != nil {
211 return false, err
212 }
213 return true, nil
214}
215
216func (p *Parser) tryParseIfNotExists() (bool, error) {
217 if !p.tryConsumeKeywords(KeywordIf) {

Callers 10

parseDropDatabaseMethod · 0.95
parseDropStmtMethod · 0.95
parserDropUserOrRoleMethod · 0.95
parseAlterRoleMethod · 0.95
parseTruncateTableMethod · 0.95

Calls 2

tryConsumeKeywordsMethod · 0.95
expectKeywordMethod · 0.95

Tested by

no test coverage detected