Class AbstractExpr
java.lang.Object
org.pgcodekeeper.core.database.base.parser.antlr.AbstractExpr
- Direct Known Subclasses:
ChAbstractExpr,MsAbstractExpr,PgAbstractExpr
Abstract base class for SQL expression analysis.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependency(ObjectLocation dependency) Adds a dependencyvoidaddDependency(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx) Adds a non-system dependencyvoidaddDependency(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx, ObjectLocation.LocationType type) Adds a dependency with parser rule context and dependency typevoidaddReference(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx) Adds a dependency with parser rule context as a referencevoidaddVariable(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx) Adds a dependency with parser rule context as a variablefindReference(String schema, String name, String column) Gets an unmodifiable set of database object dependencies found in this expression.
-
Method Details
-
getDependencies
Gets an unmodifiable set of database object dependencies found in this expression.- Returns:
- set of
ObjectLocationrepresenting dependencies
-
findReference
- Parameters:
schema- optional schema qualification of name, may be nullname- alias of the referenced objectcolumn- optional referenced column alias, may be null- Returns:
- a pair of (Alias, Dealiased name) where Alias is the given name.
Dealiased name can be null if the name is internal to the query
and is not a reference to external table.
null if the name is not found
-
addDependency
Adds a dependency- Parameters:
dependency- dependency
-
addReference
public void addReference(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx) Adds a dependency with parser rule context as a reference- Parameters:
objectReference- object locationctx- parser rule context
-
addVariable
public void addVariable(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx) Adds a dependency with parser rule context as a variable- Parameters:
objectReference- object locationctx- rule context
-
addDependency
public void addDependency(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx, ObjectLocation.LocationType type) Adds a dependency with parser rule context and dependency type- Parameters:
objectReference- object locationctx- rule contexttype- dependency type
-
addDependency
public void addDependency(ObjectReference objectReference, org.antlr.v4.runtime.ParserRuleContext ctx) Adds a non-system dependency- Parameters:
objectReference- object locationctx- rule context
-