public override string ToString() { if (this.IsNull) { return(System.Data.Common.ADP.NullString); } OracleConnection.ExecutePermission.Demand(); return(ToString(TempEnvironment.GetErrorHandle(), this._value)); }
public static OracleNumber Sign(OracleNumber n) { if (n.IsNull) { return(Null); } OracleConnection.ExecutePermission.Demand(); return((InternalSign(TempEnvironment.GetErrorHandle(), n._value) > 0) ? One : MinusOne); }
public static OracleNumber operator %(OracleNumber x, OracleNumber y) { if (x.IsNull || y.IsNull) { return(Null); } OracleConnection.ExecutePermission.Demand(); OciErrorHandle errorHandle = TempEnvironment.GetErrorHandle(); OracleNumber number = new OracleNumber(false); InternalMod(errorHandle, x._value, y._value, number._value); return(number); }
public static OracleNumber Truncate(OracleNumber n, int position) { if (n.IsNull) { return(Null); } OracleConnection.ExecutePermission.Demand(); OciErrorHandle errorHandle = TempEnvironment.GetErrorHandle(); OracleNumber number = new OracleNumber(false); InternalTrunc(errorHandle, n._value, position, number._value); return(number); }
public static OracleNumber Shift(OracleNumber n, int digits) { if (n.IsNull) { return(Null); } OracleConnection.ExecutePermission.Demand(); OciErrorHandle errorHandle = TempEnvironment.GetErrorHandle(); OracleNumber number = new OracleNumber(false); InternalShift(errorHandle, n._value, digits, number._value); return(number); }
public static OracleNumber Floor(OracleNumber n) { if (n.IsNull) { return(Null); } OracleConnection.ExecutePermission.Demand(); OciErrorHandle errorHandle = TempEnvironment.GetErrorHandle(); OracleNumber number = new OracleNumber(false); int rc = System.Data.Common.UnsafeNativeMethods.OCINumberFloor(errorHandle, n._value, number._value); if (rc != 0) { OracleException.Check(errorHandle, rc); } return(number); }
public int CompareTo(object obj) { if (!(obj.GetType() == typeof(OracleNumber))) { throw System.Data.Common.ADP.WrongType(obj.GetType(), typeof(OracleNumber)); } OracleNumber number = (OracleNumber)obj; if (this.IsNull) { if (!number.IsNull) { return(-1); } return(0); } if (number.IsNull) { return(1); } OracleConnection.ExecutePermission.Demand(); return(InternalCmp(TempEnvironment.GetErrorHandle(), this._value, number._value)); }
internal OracleNumber(string s) : this(false) { OracleConnection.ExecutePermission.Demand(); OciErrorHandle errorHandle = TempEnvironment.GetErrorHandle(); this.FromString(errorHandle, s, this._value); }
public OracleNumber(long longValue) : this(false) { OracleConnection.ExecutePermission.Demand(); FromInt64(TempEnvironment.GetErrorHandle(), longValue, this._value); }
public OracleNumber(double dblValue) : this(false) { OracleConnection.ExecutePermission.Demand(); FromDouble(TempEnvironment.GetErrorHandle(), dblValue, this._value); }