public class SqlConstraintValidator extends Object
SqlTableConstraint
.Constructor and Description |
---|
SqlConstraintValidator() |
Modifier and Type | Method and Description |
---|---|
static List<SqlTableConstraint> |
getFullConstraints(List<SqlTableConstraint> tableConstraints,
org.apache.calcite.sql.SqlNodeList columnList)
Returns the column constraints plus the table constraints.
|
static void |
validate(SqlTableConstraint constraint)
Check table constraint.
|
static void |
validateAndChangeColumnNullability(List<SqlTableConstraint> tableConstraints,
org.apache.calcite.sql.SqlNodeList columnList)
Check constraints and change the nullability of primary key columns.
|
public static List<SqlTableConstraint> getFullConstraints(List<SqlTableConstraint> tableConstraints, org.apache.calcite.sql.SqlNodeList columnList)
public static void validateAndChangeColumnNullability(List<SqlTableConstraint> tableConstraints, org.apache.calcite.sql.SqlNodeList columnList) throws SqlValidateException
SqlValidateException
- if encountered duplicate primary key constraints, or the
constraint is enforced or unique.public static void validate(SqlTableConstraint constraint) throws SqlValidateException
SqlValidateException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.