public final class SqlConstraint extends AstNodeBase
| Constructor and Description |
|---|
SqlConstraint(AstLocation location,
Expression constraintExpr)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ZserioAstVisitor visitor)
Accept zserio visitor.
|
Expression |
getConstraintExpr()
Gets original SQL constraint expression.
|
java.util.List<java.lang.String> |
getPrimaryKeyColumnNames()
Gets list of primary key column names specified by this constraint.
|
java.util.List<java.lang.String> |
getUniqueColumnNames()
Gets list of unique column names specified by this constraint.
|
static boolean |
isNullAllowed(SqlConstraint sqlConstraint)
Indicates if the SQL constraint allows 'NULL' value.
|
boolean |
isPrimaryKey()
Indicates if the SQL constraint contains 'PRIMARY KEY'.
|
void |
visitChildren(ZserioAstVisitor visitor)
Visit children of the current AST node using given visitor.
|
getLocationpublic SqlConstraint(AstLocation location, Expression constraintExpr)
location - AST node location.constraintExpr - Constraint expression.public void accept(ZserioAstVisitor visitor)
AstNodevisitor - Visitor to accept.public void visitChildren(ZserioAstVisitor visitor)
AstNodevisitChildren in interface AstNodevisitChildren in class AstNodeBasevisitor - Visitor to use.public Expression getConstraintExpr()
public boolean isPrimaryKey()
public java.util.List<java.lang.String> getPrimaryKeyColumnNames()
public java.util.List<java.lang.String> getUniqueColumnNames()
public static boolean isNullAllowed(SqlConstraint sqlConstraint)
sqlConstraint - SQL constraint.Last updated 2024-07-18 11:27:53