Class CreateAggregate
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.statement.ParserAbstract<PgDatabase>
org.pgcodekeeper.core.parsers.antlr.pg.statement.PgParserAbstract
org.pgcodekeeper.core.parsers.antlr.pg.statement.CreateAggregate
Parser for PostgreSQL CREATE AGGREGATE statements.
This class handles parsing of aggregate function definitions including state functions, final functions, parallel operations, and various aggregate-specific parameters like state types, initial conditions, and modification functions.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateAggregate(SQLParser.Create_aggregate_statementContext ctx, PgDatabase db, ISettings settings) Constructs a new CreateAggregate parser. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetParamFuncSignature(PgAggregate aggregate, PgAggregate.AggFuncs paramName) Gets the function signature for the given aggregate function parameter.static StringgetSortOperSign(PgAggregate aggr) Gets the sort operator signature for the aggregate's sort operation.voidParses a database object from the current context.Methods inherited from class org.pgcodekeeper.core.parsers.antlr.pg.statement.PgParserAbstract
getIdentifiers, getIdentifiers, getIdentifiers, getTypeName, parseArguments, parseOperatorSignature, parseSignature, unquoteQuotedStringMethods inherited from class org.pgcodekeeper.core.parsers.antlr.base.statement.ParserAbstract
fillOptionParams, fillOptionParams, getFullCtxText, getFullCtxText, getFullCtxText, getSafe, getSafe, parseArgMode, parseObject
-
Constructor Details
-
CreateAggregate
public CreateAggregate(SQLParser.Create_aggregate_statementContext ctx, PgDatabase db, ISettings settings) Constructs a new CreateAggregate parser.- Parameters:
ctx- the CREATE AGGREGATE statement contextdb- the PostgreSQL database objectsettings- the ISettings object
-
-
Method Details
-
parseObject
public void parseObject()Description copied from class:ParserAbstractParses a database object from the current context. Must be implemented by concrete subclasses to handle specific object types.- Specified by:
parseObjectin classParserAbstract<PgDatabase>
-
getParamFuncSignature
Gets the function signature for the given aggregate function parameter.This method constructs the appropriate function signature based on the aggregate's configuration and the specific function parameter type.
- Parameters:
aggregate- the aggregate object containing state and parameter informationparamName- the type of aggregate function parameter- Returns:
- the formatted function signature string
-
getSortOperSign
Gets the sort operator signature for the aggregate's sort operation.- Parameters:
aggr- the aggregate object- Returns:
- the sort operator signature string
-