Package gudusoft.gsqlparser.util
Class TNiladicFunctionUtil
Object
gudusoft.gsqlparser.util.TNiladicFunctionUtil
Utility class for checking niladic functions (built-in functions without parentheses).
Niladic functions are functions that can be called without parentheses and look like
column references but are actually function calls returning values.
Examples:
- SQL Server: CURRENT_USER, SYSTEM_USER, CURRENT_TIMESTAMP
- BigQuery: CURRENT_DATE, CURRENT_DATETIME, CURRENT_TIME
- PostgreSQL: CURRENT_DATE, CURRENT_USER, LOCALTIME
The function list is loaded from:
/gudusoft/gsqlparser/builtinFunctions/niladicFunctions.properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNiladicFunctions(EDbVendor vendor) Get all niladic functions for a vendor.static booleanisNiladicFunction(EDbVendor vendor, String functionName) Check if a name is a niladic function for the given database vendor.
-
Constructor Details
-
TNiladicFunctionUtil
public TNiladicFunctionUtil()
-
-
Method Details
-
isNiladicFunction
Check if a name is a niladic function for the given database vendor.- Parameters:
vendor- The database vendorfunctionName- The function name to check (case-insensitive)- Returns:
- true if it's a known niladic function for this vendor
-
getNiladicFunctions
Get all niladic functions for a vendor.- Parameters:
vendor- The database vendor- Returns:
- Set of niladic function names (uppercase), or empty set if none
-