protected void visitColumnDefault(SQLColumnDefinition x) { if (x.getParent() instanceof SQLBlockStatement) { print0(" := "); } else { print0(ucase ? " DEFAULT " : " default "); } x.getDefaultExpr().accept(this); }
public boolean visit(SQLColumnDefinition x) { String tableName = null; { SQLObject parent = x.getParent(); if (parent instanceof SQLCreateTableStatement) { tableName = ((SQLCreateTableStatement) parent).getName().toString(); } } if (tableName == null) { return true; } String columnName = x.getName().toString(); Column column = addColumn(tableName, columnName); if (x.getDataType() != null) { column.setDataType(x.getDataType().getName()); } for (SQLColumnConstraint item : x.getConstraints()) { if (item instanceof SQLPrimaryKey) { column.setPrimaryKey(true); } else if (item instanceof SQLUnique) { column.setUnique(true); } } return false; }
protected void visitColumnDefault(SQLColumnDefinition x) { if (x.getParent() instanceof SQLBlockStatement) { print0(" := "); } else { print0(ucase ? " DEFAULT " : " default "); } x.getDefaultExpr().accept(this); }
public boolean visit(SQLColumnDefinition x) { String tableName = null; { SQLObject parent = x.getParent(); if (parent instanceof SQLCreateTableStatement) { tableName = ((SQLCreateTableStatement) parent).getName().toString(); } } if (tableName == null) { return true; } String columnName = x.getName().toString(); Column column = addColumn(tableName, columnName); if (x.getDataType() != null) { column.setDataType(x.getDataType().getName()); } for (SQLColumnConstraint item : x.getConstraints()) { if (item instanceof SQLPrimaryKey) { column.setPrimaryKey(true); } else if (item instanceof SQLUnique) { column.setUnique(true); } } return false; }