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

Method expectLong

core/src/main/java/io/questdb/griffin/SqlParser.java:754–769  ·  view source on GitHub ↗
(GenericLexer lexer)

Source from the content-addressed store, hash-verified

752 }
753
754 private long expectLong(GenericLexer lexer) throws SqlException {
755 CharSequence tok = tok(lexer, "long integer");
756 boolean negative;
757 if (Chars.equals(tok, '-')) {
758 negative = true;
759 tok = tok(lexer, "long integer");
760 } else {
761 negative = false;
762 }
763 try {
764 long result = Numbers.parseLong(tok);
765 return negative ? -result : result;
766 } catch (NumericException e) {
767 throw err(lexer, tok, "bad long integer");
768 }
769 }
770
771 private void expectObservation(GenericLexer lexer) throws SqlException {
772 if (isObservationKeyword(tok(lexer, "'observation'"))) {

Callers 2

parseCreateTableMethod · 0.95
parseInsertMethod · 0.95

Calls 4

tokMethod · 0.95
equalsMethod · 0.95
parseLongMethod · 0.95
errMethod · 0.95

Tested by

no test coverage detected