MCPcopy Create free account
hub / github.com/questdb/questdb / parseWith

Method parseWith

core/src/main/java/io/questdb/griffin/SqlParser.java:4658–4680  ·  view source on GitHub ↗
(
            GenericLexer lexer,
            SqlParserCallback sqlParserCallback,
            @Nullable LowerCaseCharSequenceObjHashMap<ExpressionNode> decls
    )

Source from the content-addressed store, hash-verified

4656 }
4657
4658 @SuppressWarnings("SameParameterValue")
4659 @NotNull
4660 private ExecutionModel parseWith(
4661 GenericLexer lexer,
4662 SqlParserCallback sqlParserCallback,
4663 @Nullable LowerCaseCharSequenceObjHashMap<ExpressionNode> decls
4664 ) throws SqlException {
4665 parseWithClauses(lexer, topLevelWithModel, sqlParserCallback, decls);
4666 CharSequence tok = tok(lexer, "'select', 'update' or name expected");
4667 if (isSelectKeyword(tok)) {
4668 return parseSelect(lexer, sqlParserCallback, decls);
4669 }
4670
4671 if (isUpdateKeyword(tok)) {
4672 return parseUpdate(lexer, sqlParserCallback, decls);
4673 }
4674
4675 if (isInsertKeyword(tok)) {
4676 return parseInsert(lexer, sqlParserCallback, decls);
4677 }
4678
4679 throw SqlException.$(lexer.lastTokenPosition(), "'select' | 'update' | 'insert' expected");
4680 }
4681
4682 private IQueryModel parseWith(
4683 GenericLexer lexer,

Callers 3

parseExplainMethod · 0.95
parseSelectFromMethod · 0.95
parseMethod · 0.95

Calls 15

parseWithClausesMethod · 0.95
tokMethod · 0.95
parseSelectMethod · 0.95
parseUpdateMethod · 0.95
parseInsertMethod · 0.95
$Method · 0.95
isSelectKeywordMethod · 0.80
isUpdateKeywordMethod · 0.80
isInsertKeywordMethod · 0.80
lastTokenPositionMethod · 0.80
stashMethod · 0.80

Tested by

no test coverage detected