/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!StringUtils.isEmpty(col.getTypeName())) return appendSize(col, col.getTypeName()); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
@Override protected String appendSize(Column col, String typeName) { // foxpro does not like unsized column declarations. if (col.getSize() == 0) { if ("CHARACTER".equals(typeName)) col.setSize(240); else if ("NUMERIC".equals(typeName)) col.setSize(19); } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { // foxpro does not like unsized column declarations. if (col.getSize() == 0) { if ("CHARACTER".equals(typeName)) col.setSize(240); else if ("NUMERIC".equals(typeName)) col.setSize(19); } return super.appendSize(col, typeName); }
protected String appendSize(Column col, String typeName) { // foxpro does not like unsized column declarations. if (col.getSize() == 0) { if ("CHARACTER".equals(typeName)) col.setSize(240); else if ("NUMERIC".equals(typeName)) col.setSize(19); } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { // foxpro does not like unsized column declarations. if (col.getSize() == 0) { if ("CHARACTER".equals(typeName)) col.setSize(240); else if ("NUMERIC".equals(typeName)) col.setSize(19); } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { // foxpro does not like unsized column declarations. if (col.getSize() == 0) { if ("CHARACTER".equals(typeName)) col.setSize(240); else if ("NUMERIC".equals(typeName)) col.setSize(19); } return super.appendSize(col, typeName); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
protected String appendSize(Column col, String typeName) { if (firebirdVersion != FB_VERSION_15) return super.appendSize(col, typeName); return super.appendSize(col, typeName); if (index.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (unique.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (foreignKey.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); return super.appendSize(col, typeName);
protected String appendSize(Column col, String typeName) { if (firebirdVersion != FB_VERSION_15) return super.appendSize(col, typeName); return super.appendSize(col, typeName); if (index.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (unique.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (foreignKey.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); return super.appendSize(col, typeName);
protected String appendSize(Column col, String typeName) { if (firebirdVersion != FB_VERSION_15) return super.appendSize(col, typeName); return super.appendSize(col, typeName); if (index.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (unique.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (foreignKey.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); return super.appendSize(col, typeName);
protected String appendSize(Column col, String typeName) { if (firebirdVersion != FB_VERSION_15) return super.appendSize(col, typeName); return super.appendSize(col, typeName); if (index.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (unique.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); if (foreignKey.containsColumn(col)) { col.setSize(indexedVarcharMaxSizeFB15); return super.appendSize(col, typeName); return super.appendSize(col, typeName);
protected String appendSize(Column col, String typeName) { if (col.isPrimaryKey() && col.getType() == Types.VARCHAR) { // reduce size of varchar primary key cols proportional to the // number of cols, because interbase caps the total pk size int numKeys = 1; if (col.getTable() != null && col.getTable().getPrimaryKey() != null) numKeys = col.getTable().getPrimaryKey().getColumns().length; col.setSize(Math.min(col.getSize(), 200 / numKeys)); } else if (col.getType() == Types.VARCHAR && col.getSize() > 200 && col.getTable() != null) { // indexed varchar cols have to be <= 250 chars Index[] idx = col.getTable().getIndexes(); for (int i = 0; i < idx.length; i++) { if (idx[i].containsColumn(col)) { col.setSize(Math.min(col.getSize(), 200)); break; } } } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { if (col.isPrimaryKey() && col.getType() == Types.VARCHAR) { // reduce size of varchar primary key cols proportional to the // number of cols, because interbase caps the total pk size int numKeys = 1; if (col.getTable() != null && col.getTable().getPrimaryKey() != null) numKeys = col.getTable().getPrimaryKey().getColumns().length; col.setSize(Math.min(col.getSize(), 200 / numKeys)); } else if (col.getType() == Types.VARCHAR && col.getSize() > 200 && col.getTable() != null) { // indexed varchar cols have to be <= 250 chars Index[] idx = col.getTable().getIndexes(); for (int i = 0; i < idx.length; i++) { if (idx[i].containsColumn(col)) { col.setSize(Math.min(col.getSize(), 200)); break; } } } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { if (col.isPrimaryKey() && col.getType() == Types.VARCHAR) { // reduce size of varchar primary key cols proportional to the // number of cols, because interbase caps the total pk size int numKeys = 1; if (col.getTable() != null && col.getTable().getPrimaryKey() != null) numKeys = col.getTable().getPrimaryKey().getColumns().length; col.setSize(Math.min(col.getSize(), 200 / numKeys)); } else if (col.getType() == Types.VARCHAR && col.getSize() > 200 && col.getTable() != null) { // indexed varchar cols have to be <= 250 chars Index[] idx = col.getTable().getIndexes(); for (int i = 0; i < idx.length; i++) { if (idx[i].containsColumn(col)) { col.setSize(Math.min(col.getSize(), 200)); break; } } } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { if (col.isPrimaryKey() && col.getType() == Types.VARCHAR) { // reduce size of varchar primary key cols proportional to the // number of cols, because interbase caps the total pk size int numKeys = 1; if (col.getTable() != null && col.getTable().getPrimaryKey() != null) numKeys = col.getTable().getPrimaryKey().getColumns().length; col.setSize(Math.min(col.getSize(), 200 / numKeys)); } else if (col.getType() == Types.VARCHAR && col.getSize() > 200 && col.getTable() != null) { // indexed varchar cols have to be <= 250 chars Index[] idx = col.getTable().getIndexes(); for (int i = 0; i < idx.length; i++) { if (idx[i].containsColumn(col)) { col.setSize(Math.min(col.getSize(), 200)); break; } } } return super.appendSize(col, typeName); }
@Override protected String appendSize(Column col, String typeName) { if (col.isPrimaryKey() && col.getType() == Types.VARCHAR) { // reduce size of varchar primary key cols proportional to the // number of cols, because interbase caps the total pk size int numKeys = 1; if (col.getTable() != null && col.getTable().getPrimaryKey() != null) numKeys = col.getTable().getPrimaryKey().getColumns().length; col.setSize(Math.min(col.getSize(), 200 / numKeys)); } else if (col.getType() == Types.VARCHAR && col.getSize() > 200 && col.getTable() != null) { // indexed varchar cols have to be <= 250 chars Index[] idx = col.getTable().getIndexes(); for (int i = 0; i < idx.length; i++) { if (idx[i].containsColumn(col)) { col.setSize(Math.min(col.getSize(), 200)); break; } } } return super.appendSize(col, typeName); }