Class PgFormatterUtils
java.lang.Object
org.pgcodekeeper.core.database.pg.formatter.PgFormatterUtils
Utility class containing PostgreSQL-specific formatting helper methods.
Provides common operations for identifying and handling SQL operators.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckOperator(org.antlr.v4.runtime.Token t, int type, List<? extends org.antlr.v4.runtime.Token> tokens) Validates whether a token should be treated as an operator in its context.static booleanisOperatorToken(int type) Checks if a token type represents a SQL operator.
-
Method Details
-
isOperatorToken
public static boolean isOperatorToken(int type) Checks if a token type represents a SQL operator.- Parameters:
type- The token type to check (from SQLLexer)- Returns:
- true if the token type is a recognized operator, false otherwise
-
checkOperator
public static boolean checkOperator(org.antlr.v4.runtime.Token t, int type, List<? extends org.antlr.v4.runtime.Token> tokens) Validates whether a token should be treated as an operator in its context.- Parameters:
t- The token being checkedtype- The token type (from SQLLexer)tokens- The complete list of tokens for context analysis- Returns:
- true if the token should be treated as an operator, false otherwise
-