public IsUnsignedCompatible ( DbType type ) : bool | ||
type | DbType | The DbType |
리턴 | bool |
protected virtual void AddUnsigned(Column column, List <string> vals) { if (dialect.IsUnsignedCompatible(column.Type)) { AddValueIfSelected(column, ColumnProperty.Unsigned, vals); } }
public void MapColumnProperties(Column column) { Name = column.Name; indexed = PropertySelected(column.ColumnProperty, ColumnProperty.Indexed); List <string> vals = new List <string>(); vals.Add(dialect.ColumnNameNeedsQuote ? QuotedName : Name); vals.Add(type); if (!dialect.IdentityNeedsType) { AddValueIfSelected(column, ColumnProperty.Identity, vals); } if (dialect.IsUnsignedCompatible(column.Type)) { AddValueIfSelected(column, ColumnProperty.Unsigned, vals); } if (!PropertySelected(column.ColumnProperty, ColumnProperty.PrimaryKey) || dialect.NeedsNotNullForIdentity) { AddValueIfSelected(column, ColumnProperty.NotNull, vals); } AddValueIfSelected(column, ColumnProperty.PrimaryKey, vals); if (dialect.IdentityNeedsType) { AddValueIfSelected(column, ColumnProperty.Identity, vals); } AddValueIfSelected(column, ColumnProperty.Unique, vals); AddValueIfSelected(column, ColumnProperty.ForeignKey, vals); if (column.DefaultValue != null) { vals.Add(dialect.Default(column.DefaultValue)); } columnSql = String.Join(" ", vals.ToArray()); }