private void checkDefaultReferencesTable(Expression defaultExpression) {
if (defaultExpression == null) {
return;
}
HashSet<DbObject> dependencies = New.hashSet();
ExpressionVisitor visitor = ExpressionVisitor.getDependenciesVisitor(dependencies);
defaultExpression.isEverything(visitor);
if (dependencies.contains(table)) {
throw DbException.get(ErrorCode.COLUMN_IS_REFERENCED_1, defaultExpression.getSQL());
}
}