Class CreateDomain
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.CreateDomain
Parser for PostgreSQL CREATE DOMAIN statements.
This class handles parsing of domain definitions including the underlying data type, default values, check constraints, collation, and null constraints. Domains are user-defined data types based on existing types with additional constraints and default values.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateDomain(SQLParser.Create_domain_statementContext ctx, PgDatabase db, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new CreateDomain parser. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidparseDomainConstraint(PgDomain domain, PgConstraintCheck constr, SQLParser.Domain_constraintContext ctx, AbstractDatabase db, String location, ISettings settings) Parses a domain constraint definition and configures the constraint object.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
-
CreateDomain
public CreateDomain(SQLParser.Create_domain_statementContext ctx, PgDatabase db, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new CreateDomain parser.- Parameters:
ctx- the CREATE DOMAIN statement contextdb- the PostgreSQL database objectstream- the token stream for parsingsettings- 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>
-
parseDomainConstraint
public static void parseDomainConstraint(PgDomain domain, PgConstraintCheck constr, SQLParser.Domain_constraintContext ctx, AbstractDatabase db, String location, ISettings settings) Parses a domain constraint definition and configures the constraint object.This method processes CHECK constraints for domains, including the constraint expression and sets up analysis launchers for dependency tracking.
- Parameters:
domain- the domain object that owns the constraintconstr- the constraint object to configurectx- the domain constraint contextdb- the database for analysis launcherslocation- the source location for error reportingsettings- the parser settings
-