Class PgCreateStatistics
java.lang.Object
org.pgcodekeeper.core.database.base.parser.statement.ParserAbstract<PgDatabase>
org.pgcodekeeper.core.database.pg.parser.statement.PgParserAbstract
org.pgcodekeeper.core.database.pg.parser.statement.PgCreateStatistics
Parser for PostgreSQL CREATE STATISTICS statements.
This class handles parsing of extended statistics definitions including statistics kinds (ndistinct, dependencies, mcv), target table references, and column expressions. Extended statistics provide improved query planning by collecting multi-column statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionPgCreateStatistics(SQLParser.Create_statistics_statementContext ctx, PgDatabase db, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new CreateStatistics parser. -
Method Summary
Modifier and TypeMethodDescriptionvoidParses a database object from the current context.voidparseStatistics(PgStatistics stat) Parses statistics configuration from the statement context.Methods inherited from class org.pgcodekeeper.core.database.pg.parser.statement.PgParserAbstract
fillOptionParams, fillOptionParams, getIdentifiers, getIdentifiers, getIdentifiers, getTypeName, parseArguments, parseOperatorSignature, parseSignature, unquoteQuotedStringMethods inherited from class org.pgcodekeeper.core.database.base.parser.statement.ParserAbstract
getFullCtxText, getFullCtxText, getFullCtxText, getSafe, getSafe, parseArgMode, parseObject
-
Constructor Details
-
PgCreateStatistics
public PgCreateStatistics(SQLParser.Create_statistics_statementContext ctx, PgDatabase db, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new CreateStatistics parser.- Parameters:
ctx- the CREATE STATISTICS statement contextdb- the PostgreSQL database objectstream- the token stream for parsing expressionssettings- 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>
-
parseStatistics
Parses statistics configuration from the statement context.- Parameters:
stat- the statistics object to populate with parsed data
-