public override DbTypeBase ToGenericType() { DbTypeNumeric res = new DbTypeNumeric(); res.Precision = Precision; res.Scale = Scale; if (IsIdentity) { res.Autoincrement = true; res.SetSpecificAttribute("effiproz", "identity_increment", IdentityIncrement.ToString()); res.SetSpecificAttribute("effiproz", "identity_seed", IdentitySeed.ToString()); } return(res); }
public override DbTypeBase ToGenericType() { DbTypeNumeric res = new DbTypeNumeric(); res.Precision = Length; res.Scale = Decimals; res.SetSpecificAttribute("mysql", "subtype", SqlName); SaveType(res); return(res); }
public override DbTypeBase ToGenericType() { if (Precision == null && Scale == null) { var fres = new DbTypeFloat { Bytes = 8 }; fres.SetSpecificAttribute("oracle", "subtype", "number"); return(fres); } if (Precision != null && Scale != null) { var nres = new DbTypeNumeric(); nres.Precision = Precision.Value; nres.Scale = Scale.Value; return(nres); } if ((Scale ?? 0) == 0) { var ires = new DbTypeInt { Bytes = 4 }; if (Precision != null) { ires.SetSpecificAttribute("oracle", "length", Precision.ToString()); } return(ires); } if (Precision == null) { var nres = new DbTypeNumeric(); nres.Scale = Scale.Value; nres.SetSpecificAttribute("oracle", "noprec", "1"); return(nres); } // this should never happen return(new DbTypeNumeric()); }