DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.Sql.Objects.SqlNumber Struct Reference
Inheritance diagram for Deveel.Data.Sql.Objects.SqlNumber:
Deveel.Data.Sql.Objects.ISqlObject Deveel.Data.Serialization.ISerializable

Public Member Functions

 SqlNumber (byte[] bytes, int scale)
 
 SqlNumber (byte[] bytes, int scale, int precision)
 
 SqlNumber (int value, int precision)
 
 SqlNumber (int value)
 
 SqlNumber (long value, int precision)
 
 SqlNumber (long value)
 
 SqlNumber (double value)
 
 SqlNumber (double value, int precision)
 
void ISerializable. GetData (SerializeData data)
 
int IComparable. CompareTo (object obj)
 
int IComparable< ISqlObject >. CompareTo (ISqlObject other)
 
bool ISqlObject. IsComparableTo (ISqlObject other)
 Checks if the current object is comparable with the given one. More...
 
bool Equals (SqlNumber other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
int CompareTo (SqlNumber other)
 
TypeCode IConvertible. GetTypeCode ()
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 
char IConvertible. ToChar (IFormatProvider provider)
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 
byte IConvertible. ToByte (IFormatProvider provider)
 
short IConvertible. ToInt16 (IFormatProvider provider)
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 
int IConvertible. ToInt32 (IFormatProvider provider)
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 
long IConvertible. ToInt64 (IFormatProvider provider)
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 
float IConvertible. ToSingle (IFormatProvider provider)
 
double IConvertible. ToDouble (IFormatProvider provider)
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
string IConvertible. ToString (IFormatProvider provider)
 
object IConvertible. ToType (Type conversionType, IFormatProvider provider)
 
byte[] ToByteArray ()
 
override string ToString ()
 
double ToDouble ()
 
float ToSingle ()
 
long ToInt64 ()
 
int ToInt32 ()
 
short ToInt16 ()
 
byte ToByte ()
 
bool ToBoolean ()
 
SqlNumber XOr (SqlNumber value)
 
SqlNumber And (SqlNumber value)
 
SqlNumber Or (SqlNumber value)
 
SqlNumber Add (SqlNumber value)
 
SqlNumber Subtract (SqlNumber value)
 
SqlNumber Multiply (SqlNumber value)
 
SqlNumber Divide (SqlNumber value)
 
SqlNumber Modulo (SqlNumber value)
 
SqlNumber Abs ()
 
SqlNumber SetScale (int scale, RoundingMode mode)
 
SqlNumber Negate ()
 
SqlNumber Plus ()
 
SqlNumber Not ()
 
SqlNumber Sqrt ()
 
SqlNumber Root (int n)
 
SqlNumber Sin ()
 
SqlNumber Cos ()
 
SqlNumber Cot ()
 
SqlNumber Tan ()
 
SqlNumber Pow (SqlNumber exp)
 
SqlNumber Log2 ()
 
SqlNumber Round ()
 
SqlNumber Round (int precision)
 

Static Public Member Functions

static bool TryParse (string s, out SqlNumber value)
 
static SqlNumber Parse (string s)
 
static SqlNumber operator+ (SqlNumber a, SqlNumber b)
 
static SqlNumber operator- (SqlNumber a, SqlNumber b)
 
static SqlNumber operator* (SqlNumber a, SqlNumber b)
 
static SqlNumber operator/ (SqlNumber a, SqlNumber b)
 
static SqlNumber operator% (SqlNumber a, SqlNumber b)
 
static SqlNumber operator| (SqlNumber a, SqlNumber b)
 
static SqlNumber operator- (SqlNumber a)
 
static SqlNumber operator+ (SqlNumber a)
 
static bool operator== (SqlNumber a, SqlNumber b)
 
static bool operator!= (SqlNumber a, SqlNumber b)
 
static bool operator> (SqlNumber a, SqlNumber b)
 
static bool operator< (SqlNumber a, SqlNumber b)
 
static bool operator>= (SqlNumber a, SqlNumber b)
 
static bool operator<= (SqlNumber a, SqlNumber b)
 

Static Public Attributes

static readonly SqlNumber Zero = new SqlNumber(NumericState.None, BigDecimal.Zero)
 
static readonly SqlNumber One = new SqlNumber(NumericState.None, BigDecimal.One)
 
static readonly SqlNumber Null = new SqlNumber(NumericState.None, null)
 
static readonly SqlNumber NaN = new SqlNumber(NumericState.NotANumber, null)
 
static readonly SqlNumber NegativeInfinity = new SqlNumber(NumericState.NegativeInfinity, null)
 
static readonly SqlNumber PositiveInfinity = new SqlNumber(NumericState.PositiveInfinity, null)
 

Properties

NumericState State [get, private set]
 
bool CanBeInt64 [get]
 
bool CanBeInt32 [get]
 
int Scale [get]
 
int Precision [get]
 
MathContext MathContext [get]
 
int Sign [get]
 
bool IsNull [get]
 
- Properties inherited from Deveel.Data.Sql.Objects.ISqlObject
bool IsNull [get]
 Gets a boolean value indicating if the object is NULL. More...
 

Private Member Functions

 SqlNumber (BigDecimal value)
 
 SqlNumber (NumericState state, BigDecimal value)
 
 SqlNumber (ObjectData data)
 
NumericState InverseState ()
 

Private Attributes

readonly BigDecimal innerValue
 
readonly int byteCount
 
readonly long valueAsLong
 

Detailed Description

Definition at line 24 of file SqlNumber.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( BigDecimal  value)
inlineprivate

Definition at line 39 of file SqlNumber.cs.

40  : this(NumericState.None, value) {
41  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( NumericState  state,
BigDecimal  value 
)
inlineprivate

Definition at line 43 of file SqlNumber.cs.

44  : this() {
45  valueAsLong = 0;
46  byteCount = 120;
47 
48  if (value != null && value.Scale == 0) {
49  BigInteger bint = value.ToBigInteger();
50  int bitCount = bint.BitLength;
51  if (bitCount < 30) {
52  valueAsLong = bint.ToInt64();
53  byteCount = 4;
54  } else if (bitCount < 60) {
55  valueAsLong = bint.ToInt64();
56  byteCount = 8;
57  }
58  }
59 
60  innerValue = value;
61  State = state;
62  }
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( byte[]  bytes,
int  scale 
)
inline

Definition at line 64 of file SqlNumber.cs.

65  : this(new BigDecimal(new BigInteger(bytes), scale)) {
66  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( byte[]  bytes,
int  scale,
int  precision 
)
inline

Definition at line 68 of file SqlNumber.cs.

69  : this(new BigDecimal(new BigInteger(bytes), scale, new MathContext(precision))) {
70  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( int  value,
int  precision 
)
inline

Definition at line 72 of file SqlNumber.cs.

73  : this(new BigDecimal(value, new MathContext(precision))) {
74  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( int  value)
inline

Definition at line 76 of file SqlNumber.cs.

77  : this(value, MathContext.Decimal32.Precision) {
78  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( long  value,
int  precision 
)
inline

Definition at line 80 of file SqlNumber.cs.

81  : this(new BigDecimal(value, new MathContext(precision))) {
82  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( long  value)
inline

Definition at line 84 of file SqlNumber.cs.

85  : this(value, MathContext.Decimal64.Precision) {
86  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( double  value)
inline

Definition at line 88 of file SqlNumber.cs.

89  : this(value, MathContext.Decimal128.Precision) {
90  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( double  value,
int  precision 
)
inline

Definition at line 92 of file SqlNumber.cs.

93  : this(new BigDecimal(value, new MathContext(precision))) {
94  }
Deveel.Data.Sql.Objects.SqlNumber.SqlNumber ( ObjectData  data)
inlineprivate

Definition at line 96 of file SqlNumber.cs.

97  : this() {
98  var state = (NumericState) data.GetByte("State");
99 
100  if (state == NumericState.None) {
101  var bytes = data.GetValue<byte[]>("Bytes");
102  var scale = data.GetInt32("Scale");
103  var precision = data.GetInt32("Precision");
104 
105  innerValue = new BigDecimal(new BigInteger(bytes), scale, new MathContext(precision));
106  }
107 
108  State = state;
109  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25

Member Function Documentation

SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Abs ( )
inline

Definition at line 588 of file SqlNumber.cs.

588  {
589  if (State == NumericState.None)
590  return new SqlNumber(NumericState.None, innerValue.Abs());
591  if (State == NumericState.NegativeInfinity)
592  return new SqlNumber(NumericState.PositiveInfinity, null);
593  return new SqlNumber(State, null);
594  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Add ( SqlNumber  value)
inline

Definition at line 510 of file SqlNumber.cs.

510  {
511  if (State == NumericState.None) {
512  if (value.State == NumericState.None) {
513  if (IsNull || value.IsNull)
514  return Null;
515 
516  return new SqlNumber(NumericState.None, innerValue.Add(value.innerValue));
517  }
518 
519  return new SqlNumber(value.State, null);
520  }
521 
522  return new SqlNumber(State, null);
523  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.And ( SqlNumber  value)
inline

Definition at line 484 of file SqlNumber.cs.

484  {
485  if (State == NumericState.NotANumber)
486  return this;
487 
488  if (Scale == 0 && value.Scale == 0) {
489  BigInteger bi1 = innerValue.ToBigInteger();
490  BigInteger bi2 = value.innerValue.ToBigInteger();
491  return new SqlNumber(NumericState.None, new BigDecimal(bi1.And(bi2)));
492  }
493 
494  return Null;
495  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
int IComparable. Deveel.Data.Sql.Objects.SqlNumber.CompareTo ( object  obj)
inline

Definition at line 151 of file SqlNumber.cs.

151  {
152  if (!(obj is SqlNumber))
153  throw new ArgumentException();
154 
155  return CompareTo((SqlNumber) obj);
156  }
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
int IComparable. CompareTo(object obj)
Definition: SqlNumber.cs:151
int IComparable<ISqlObject>. Deveel.Data.Sql.Objects.SqlNumber.CompareTo ( ISqlObject  other)
inline

Definition at line 158 of file SqlNumber.cs.

158  {
159  if (!(other is SqlNumber))
160  throw new ArgumentException();
161 
162  return CompareTo((SqlNumber) other);
163  }
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
int IComparable. CompareTo(object obj)
Definition: SqlNumber.cs:151
int Deveel.Data.Sql.Objects.SqlNumber.CompareTo ( SqlNumber  other)
inline

Definition at line 213 of file SqlNumber.cs.

213  {
214  if (Equals(this, other))
215  return 0;
216 
217  // If this is a non-infinity number
218  if (State == NumericState.None) {
219  // If both values can be represented by a long value
220  if (CanBeInt64 && other.CanBeInt64) {
221  // Perform a long comparison check,
222  return valueAsLong.CompareTo(other.valueAsLong);
223  }
224 
225  // And the compared number is non-infinity then use the BigDecimal
226  // compareTo method.
227  if (other.State == NumericState.None)
228  return innerValue.CompareTo(other.innerValue);
229 
230  // Comparing a regular number with a NaN number.
231  // If positive infinity or if NaN
232  if (other.State == NumericState.PositiveInfinity ||
233  other.State == NumericState.NotANumber) {
234  return -1;
235  }
236  // If negative infinity
237  if (other.State == NumericState.NegativeInfinity)
238  return 1;
239 
240  throw new ArgumentException("Unknown number state.");
241  }
242 
243  // This number is a NaN number.
244  // Are we comparing with a regular number?
245  if (other.State == NumericState.None) {
246  // Yes, negative infinity
247  if (State == NumericState.NegativeInfinity)
248  return -1;
249 
250  // positive infinity or NaN
251  if (State == NumericState.PositiveInfinity ||
252  State == NumericState.NotANumber)
253  return 1;
254 
255  throw new ArgumentException("Unknown number state.");
256  }
257 
258  // Comparing NaN number with a NaN number.
259  // This compares -Inf less than Inf and NaN and NaN greater than
260  // Inf and -Inf. -Inf < Inf < NaN
261  return (State - other.State);
262  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
bool Equals(SqlNumber other)
Definition: SqlNumber.cs:181
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Cos ( )
inline

Definition at line 656 of file SqlNumber.cs.

656  {
657  if (State == NumericState.None)
658  return new SqlNumber(BigMath.Cos(innerValue));
659 
660  return this;
661  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Cot ( )
inline

Definition at line 663 of file SqlNumber.cs.

663  {
664  if (State == NumericState.None)
665  return new SqlNumber(BigMath.Cot(innerValue));
666 
667  return this;
668  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Divide ( SqlNumber  value)
inline

Definition at line 554 of file SqlNumber.cs.

554  {
555  if (State == NumericState.None) {
556  if (value.State == NumericState.None) {
557  if (IsNull || value.IsNull)
558  return Null;
559 
560  BigDecimal divBy = value.innerValue;
561  if (divBy.CompareTo (BigDecimal.Zero) != 0) {
562  return new SqlNumber(NumericState.None, innerValue.Divide(divBy, 10, RoundingMode.HalfUp));
563  }
564  }
565  }
566 
567  // Return NaN if we can't divide
568  return new SqlNumber(NumericState.NotANumber, null);
569  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
bool Deveel.Data.Sql.Objects.SqlNumber.Equals ( SqlNumber  other)
inline

Definition at line 181 of file SqlNumber.cs.

181  {
182  if (State == NumericState.NegativeInfinity &&
183  other.State == NumericState.NegativeInfinity)
184  return true;
185  if (State == NumericState.PositiveInfinity &&
186  other.State == NumericState.PositiveInfinity)
187  return true;
188  if (State == NumericState.NotANumber &&
189  other.State == NumericState.NotANumber)
190  return true;
191 
192  if (IsNull && other.IsNull)
193  return true;
194  if (IsNull && !other.IsNull)
195  return false;
196  if (!IsNull && other.IsNull)
197  return false;
198 
199  return innerValue.CompareTo(other.innerValue) == 0;
200  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
override bool Deveel.Data.Sql.Objects.SqlNumber.Equals ( object  obj)
inline

Definition at line 202 of file SqlNumber.cs.

202  {
203  if (!(obj is SqlNumber))
204  return false;
205 
206  return Equals((SqlNumber) obj);
207  }
bool Equals(SqlNumber other)
Definition: SqlNumber.cs:181
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
void ISerializable. Deveel.Data.Sql.Objects.SqlNumber.GetData ( SerializeData  data)
inline

Implements Deveel.Data.Serialization.ISerializable.

Definition at line 137 of file SqlNumber.cs.

137  {
138  data.SetValue("State", (byte)State);
139 
140  if (State == NumericState.None) {
141  var bytes = innerValue.UnscaledValue.ToByteArray();
142  var scale = innerValue.Scale;
143  var precision = innerValue.Precision;
144 
145  data.SetValue("Bytes", bytes);
146  data.SetValue("Scale", scale);
147  data.SetValue("Precision", precision);
148  }
149  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
void SetValue(string key, Type type, object value)
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
override int Deveel.Data.Sql.Objects.SqlNumber.GetHashCode ( )
inline

Definition at line 209 of file SqlNumber.cs.

209  {
210  return innerValue.GetHashCode() ^ State.GetHashCode();
211  }
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
TypeCode IConvertible. Deveel.Data.Sql.Objects.SqlNumber.GetTypeCode ( )
inline

Definition at line 264 of file SqlNumber.cs.

264  {
265  if (CanBeInt32)
266  return TypeCode.Int32;
267  if (CanBeInt64)
268  return TypeCode.Int64;
269 
270  return TypeCode.Object;
271  }
NumericState Deveel.Data.Sql.Objects.SqlNumber.InverseState ( )
inlineprivate

Definition at line 169 of file SqlNumber.cs.

169  {
170  if (State == NumericState.NegativeInfinity)
171  return NumericState.PositiveInfinity;
172  if (State == NumericState.PositiveInfinity)
173  return NumericState.NegativeInfinity;
174  return State;
175  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
bool ISqlObject. Deveel.Data.Sql.Objects.SqlNumber.IsComparableTo ( ISqlObject  other)
inline

Checks if the current object is comparable with the given one.

Parameters
otherThe other ISqlObject to compare.
Returns
Returns true if the current object is comparable with the given one, false otherwise.

Implements Deveel.Data.Sql.Objects.ISqlObject.

Definition at line 177 of file SqlNumber.cs.

177  {
178  return other is SqlNumber;
179  }
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Log2 ( )
inline

Definition at line 684 of file SqlNumber.cs.

684  {
685  if (State == NumericState.None)
686  return new SqlNumber(BigMath.Log(innerValue));
687 
688  return this;
689  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Modulo ( SqlNumber  value)
inline

Definition at line 571 of file SqlNumber.cs.

571  {
572  if (State == NumericState.None) {
573  if (value.State == NumericState.None) {
574  if (IsNull || value.IsNull)
575  return Null;
576 
577  BigDecimal divBy = value.innerValue;
578  if (divBy.CompareTo(BigDecimal.Zero) != 0) {
579  BigDecimal remainder = innerValue.Remainder(divBy);
580  return new SqlNumber(NumericState.None, remainder);
581  }
582  }
583  }
584 
585  return new SqlNumber(NumericState.NotANumber, null);
586  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Multiply ( SqlNumber  value)
inline

Definition at line 539 of file SqlNumber.cs.

539  {
540  if (State == NumericState.None) {
541  if (value.State == NumericState.None) {
542  if (IsNull || value.IsNull)
543  return Null;
544 
545  return new SqlNumber(NumericState.None, innerValue.Multiply(value.innerValue));
546  }
547 
548  return new SqlNumber(value.State, null);
549  }
550 
551  return new SqlNumber(State, null);
552  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Negate ( )
inline

Definition at line 605 of file SqlNumber.cs.

605  {
606  if (State == NumericState.None)
607  return new SqlNumber(innerValue.Negate());
608  if (State == NumericState.NegativeInfinity ||
609  State == NumericState.PositiveInfinity)
610  return new SqlNumber(InverseState(), null);
611 
612  return this;
613  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Not ( )
inline

Definition at line 625 of file SqlNumber.cs.

625  {
626  if (State == NumericState.None)
627  return new SqlNumber(new BigDecimal(innerValue.ToBigInteger().Not()));
628  if (State == NumericState.NegativeInfinity ||
629  State == NumericState.PositiveInfinity)
630  return new SqlNumber(InverseState(), null);
631 
632  return this;
633  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static bool Deveel.Data.Sql.Objects.SqlNumber.operator!= ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 782 of file SqlNumber.cs.

782  {
783  return !(a == b);
784  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator% ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 762 of file SqlNumber.cs.

762  {
763  return a.Modulo(b);
764  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator* ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 754 of file SqlNumber.cs.

754  {
755  return a.Multiply(b);
756  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator+ ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 746 of file SqlNumber.cs.

746  {
747  return a.Add(b);
748  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator+ ( SqlNumber  a)
inlinestatic

Definition at line 774 of file SqlNumber.cs.

774  {
775  return a.Plus();
776  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator- ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 750 of file SqlNumber.cs.

750  {
751  return a.Subtract(b);
752  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator- ( SqlNumber  a)
inlinestatic

Definition at line 770 of file SqlNumber.cs.

770  {
771  return a.Negate();
772  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator/ ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 758 of file SqlNumber.cs.

758  {
759  return a.Divide(b);
760  }
static bool Deveel.Data.Sql.Objects.SqlNumber.operator< ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 790 of file SqlNumber.cs.

790  {
791  return a.CompareTo(b) < 0;
792  }
static bool Deveel.Data.Sql.Objects.SqlNumber.operator<= ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 799 of file SqlNumber.cs.

799  {
800  var i = a.CompareTo(b);
801  return i == 0 || i < 0;
802  }
static bool Deveel.Data.Sql.Objects.SqlNumber.operator== ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 778 of file SqlNumber.cs.

778  {
779  return a.Equals(b);
780  }
static bool Deveel.Data.Sql.Objects.SqlNumber.operator> ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 786 of file SqlNumber.cs.

786  {
787  return a.CompareTo(b) > 0;
788  }
static bool Deveel.Data.Sql.Objects.SqlNumber.operator>= ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 794 of file SqlNumber.cs.

794  {
795  var i = a.CompareTo(b);
796  return i == 0 || i > 0;
797  }
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.operator| ( SqlNumber  a,
SqlNumber  b 
)
inlinestatic

Definition at line 766 of file SqlNumber.cs.

766  {
767  return a.XOr(b);
768  }
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Or ( SqlNumber  value)
inline

Definition at line 497 of file SqlNumber.cs.

497  {
498  if (State == NumericState.NotANumber)
499  return this;
500 
501  if (Scale == 0 && value.Scale == 0) {
502  BigInteger bi1 = innerValue.ToBigInteger();
503  BigInteger bi2 = value.innerValue.ToBigInteger();
504  return new SqlNumber(NumericState.None, new BigDecimal(bi1.Or(bi2)));
505  }
506 
507  return Null;
508  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
static SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Parse ( string  s)
inlinestatic

Definition at line 738 of file SqlNumber.cs.

738  {
739  SqlNumber value;
740  if (!TryParse(s, out value))
741  throw new FormatException(string.Format("Cannot parse the string '{0}' to a valid Numeric object.", s));
742 
743  return value;
744  }
static bool TryParse(string s, out SqlNumber value)
Definition: SqlNumber.cs:702
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Plus ( )
inline

Definition at line 615 of file SqlNumber.cs.

615  {
616  if (State == NumericState.None)
617  return new SqlNumber(innerValue.Plus());
618  if (State == NumericState.NegativeInfinity ||
619  State == NumericState.PositiveInfinity)
620  return new SqlNumber(InverseState(), null);
621 
622  return this;
623  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Pow ( SqlNumber  exp)
inline

Definition at line 677 of file SqlNumber.cs.

677  {
678  if (State == NumericState.None)
679  return new SqlNumber(BigMath.Pow(innerValue, exp.innerValue));
680 
681  return this;
682  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Root ( int  n)
inline

Definition at line 642 of file SqlNumber.cs.

642  {
643  if (State == NumericState.None)
644  return new SqlNumber(BigMath.Root(n, innerValue));
645 
646  return this;
647  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Round ( )
inline

Definition at line 691 of file SqlNumber.cs.

691  {
692  return Round(MathContext.Precision);
693  }
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Round ( int  precision)
inline

Definition at line 695 of file SqlNumber.cs.

695  {
696  if (State == NumericState.None)
697  return new SqlNumber(innerValue.Round(new MathContext(precision, RoundingMode.HalfUp)));
698 
699  return this;
700  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.SetScale ( int  scale,
RoundingMode  mode 
)
inline

Definition at line 597 of file SqlNumber.cs.

597  {
598  if (State == NumericState.None)
599  return new SqlNumber(innerValue.SetScale(scale, mode));
600 
601  // Can't round -inf, +inf and NaN
602  return this;
603  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Sin ( )
inline

Definition at line 649 of file SqlNumber.cs.

649  {
650  if (State == NumericState.None)
651  return new SqlNumber(BigMath.Sin(innerValue));
652 
653  return this;
654  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Sqrt ( )
inline

Definition at line 635 of file SqlNumber.cs.

635  {
636  if (State == NumericState.None)
637  return new SqlNumber(BigMath.Sqrt(innerValue));
638 
639  return this;
640  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Subtract ( SqlNumber  value)
inline

Definition at line 525 of file SqlNumber.cs.

525  {
526  if (State == NumericState.None) {
527  if (value.State == NumericState.None) {
528  if (IsNull || value.IsNull)
529  return Null;
530 
531  return new SqlNumber(NumericState.None, innerValue.Subtract(value.innerValue));
532  }
533  return new SqlNumber(value.InverseState(), null);
534  }
535 
536  return new SqlNumber(State, null);
537  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Tan ( )
inline

Definition at line 670 of file SqlNumber.cs.

670  {
671  if (State == NumericState.None)
672  return new SqlNumber(BigMath.Tan(innerValue));
673 
674  return this;
675  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
bool IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToBoolean ( IFormatProvider  provider)
inline

Definition at line 273 of file SqlNumber.cs.

273  {
274  return ToBoolean();
275  }
bool Deveel.Data.Sql.Objects.SqlNumber.ToBoolean ( )
inline

Definition at line 462 of file SqlNumber.cs.

462  {
463  if (Equals(One))
464  return true;
465  if (Equals(Zero))
466  return false;
467 
468  throw new InvalidCastException("The value of this NUMERIC cannot be converted to a boolean.");
469  }
bool Equals(SqlNumber other)
Definition: SqlNumber.cs:181
static readonly SqlNumber Zero
Definition: SqlNumber.cs:29
static readonly SqlNumber One
Definition: SqlNumber.cs:30
byte IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToByte ( IFormatProvider  provider)
inline

Definition at line 285 of file SqlNumber.cs.

285  {
286  return ToByte();
287  }
byte Deveel.Data.Sql.Objects.SqlNumber.ToByte ( )
inline

Definition at line 450 of file SqlNumber.cs.

450  {
451  if (!CanBeInt32)
452  throw new InvalidCastException("The value of this numeric is over the maximum Byte.");
453 
454  var value = ToInt32();
455  if (value > Byte.MaxValue ||
456  value < Byte.MinValue)
457  throw new InvalidCastException("The value of this numeric is out of range of a byte.");
458 
459  return (byte)value;
460  }
byte [] Deveel.Data.Sql.Objects.SqlNumber.ToByteArray ( )
inline

Definition at line 365 of file SqlNumber.cs.

365  {
366  return State == NumericState.None
367  ? innerValue.MovePointRight(innerValue.Scale).ToBigInteger().ToByteArray()
368  : new byte[0];
369  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
char IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToChar ( IFormatProvider  provider)
inline

Definition at line 277 of file SqlNumber.cs.

277  {
278  throw new InvalidCastException("Conversion of NUMERIC to Char is invalid.");
279  }
DateTime IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToDateTime ( IFormatProvider  provider)
inline

Definition at line 325 of file SqlNumber.cs.

325  {
326  throw new InvalidCastException("Cannot cast NUMERIC to DateTime automatically.");
327  }
decimal IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToDecimal ( IFormatProvider  provider)
inline

Definition at line 321 of file SqlNumber.cs.

321  {
322  throw new NotSupportedException("Conversion to Decimal not supported yet.");
323  }
double IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToDouble ( IFormatProvider  provider)
inline

Definition at line 317 of file SqlNumber.cs.

317  {
318  return ToDouble();
319  }
double Deveel.Data.Sql.Objects.SqlNumber.ToDouble ( )
inline

Definition at line 386 of file SqlNumber.cs.

386  {
387  switch (State) {
388  case (NumericState.None):
389  return innerValue.ToDouble();
390  case (NumericState.NegativeInfinity):
391  return Double.NegativeInfinity;
392  case (NumericState.PositiveInfinity):
393  return Double.PositiveInfinity;
394  case (NumericState.NotANumber):
395  return Double.NaN;
396  default:
397  throw new InvalidCastException("Unknown number state");
398  }
399  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
short IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToInt16 ( IFormatProvider  provider)
inline

Definition at line 289 of file SqlNumber.cs.

289  {
290  return ToInt16();
291  }
short Deveel.Data.Sql.Objects.SqlNumber.ToInt16 ( )
inline

Definition at line 438 of file SqlNumber.cs.

438  {
439  if (!CanBeInt32)
440  throw new InvalidCastException("The value of this numeric is over the maximum Int16.");
441 
442  var value = ToInt32();
443  if (value > Int16.MaxValue ||
444  value < Int16.MinValue)
445  throw new InvalidCastException("The value of this numeric is out of range of a short integer.");
446 
447  return (short)value;
448  }
int IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToInt32 ( IFormatProvider  provider)
inline

Definition at line 297 of file SqlNumber.cs.

297  {
298  return ToInt32();
299  }
int Deveel.Data.Sql.Objects.SqlNumber.ToInt32 ( )
inline

Definition at line 427 of file SqlNumber.cs.

427  {
428  if (CanBeInt32)
429  return (int)valueAsLong;
430  switch (State) {
431  case (NumericState.None):
432  return innerValue.ToInt32();
433  default:
434  return (int)ToDouble();
435  }
436  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
long IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToInt64 ( IFormatProvider  provider)
inline

Definition at line 305 of file SqlNumber.cs.

305  {
306  return ToInt64();
307  }
long Deveel.Data.Sql.Objects.SqlNumber.ToInt64 ( )
inline

Definition at line 416 of file SqlNumber.cs.

416  {
417  if (CanBeInt64)
418  return valueAsLong;
419  switch (State) {
420  case (NumericState.None):
421  return innerValue.ToInt64();
422  default:
423  return (long)ToDouble();
424  }
425  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
sbyte IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToSByte ( IFormatProvider  provider)
inline

Definition at line 281 of file SqlNumber.cs.

281  {
282  throw new NotSupportedException("Conversion to Signed Byte numbers not supported yet.");
283  }
float IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToSingle ( IFormatProvider  provider)
inline

Definition at line 313 of file SqlNumber.cs.

313  {
314  return ToSingle();
315  }
float Deveel.Data.Sql.Objects.SqlNumber.ToSingle ( )
inline

Definition at line 401 of file SqlNumber.cs.

401  {
402  switch (State) {
403  case (NumericState.None):
404  return innerValue.ToSingle();
405  case (NumericState.NegativeInfinity):
406  return Single.NegativeInfinity;
407  case (NumericState.PositiveInfinity):
408  return Single.PositiveInfinity;
409  case (NumericState.NotANumber):
410  return Single.NaN;
411  default:
412  throw new InvalidCastException("Unknown number state");
413  }
414  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
string IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToString ( IFormatProvider  provider)
inline

Definition at line 329 of file SqlNumber.cs.

329  {
330  return ToString();
331  }
override string Deveel.Data.Sql.Objects.SqlNumber.ToString ( )
inline

Definition at line 371 of file SqlNumber.cs.

371  {
372  switch (State) {
373  case (NumericState.None):
374  return innerValue.ToString();
375  case (NumericState.NegativeInfinity):
376  return "-Infinity";
377  case (NumericState.PositiveInfinity):
378  return "Infinity";
379  case (NumericState.NotANumber):
380  return "NaN";
381  default:
382  throw new InvalidCastException("Unknown number state");
383  }
384  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
object IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToType ( Type  conversionType,
IFormatProvider  provider 
)
inline

Definition at line 333 of file SqlNumber.cs.

333  {
334  if (conversionType == typeof (bool))
335  return ToBoolean();
336  if (conversionType == typeof (byte))
337  return ToByte();
338  if (conversionType == typeof (short))
339  return ToInt16();
340  if (conversionType == typeof (int))
341  return ToInt32();
342  if (conversionType == typeof (long))
343  return ToInt64();
344  if (conversionType == typeof (float))
345  return ToSingle();
346  if (conversionType == typeof (double))
347  return ToDouble();
348 
349  if (conversionType == typeof (byte[]))
350  return ToByteArray();
351 
352  if (conversionType == typeof (string))
353  return ToString();
354 
355  if (conversionType == typeof (SqlBoolean))
356  return new SqlBoolean(ToBoolean());
357  if (conversionType == typeof (SqlBinary))
358  return new SqlBinary(ToByteArray());
359  if (conversionType == typeof (SqlString))
360  return new SqlString(ToString());
361 
362  throw new InvalidCastException(System.String.Format("Cannot convert NUMERIC to {0}", conversionType));
363  }
Deveel.Data.Sql.Objects.SqlBoolean SqlBoolean
Definition: DataObject.cs:26
Deveel.Data.Sql.Objects.SqlString SqlString
Definition: DataObject.cs:27
ushort IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToUInt16 ( IFormatProvider  provider)
inline

Definition at line 293 of file SqlNumber.cs.

293  {
294  throw new NotSupportedException("Conversion to Unsigned numbers not supported yet.");
295  }
uint IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToUInt32 ( IFormatProvider  provider)
inline

Definition at line 301 of file SqlNumber.cs.

301  {
302  throw new NotSupportedException("Conversion to Unsigned numbers not supported yet.");
303  }
ulong IConvertible. Deveel.Data.Sql.Objects.SqlNumber.ToUInt64 ( IFormatProvider  provider)
inline

Definition at line 309 of file SqlNumber.cs.

309  {
310  throw new NotSupportedException("Conversion to Unsigned numbers not supported yet.");
311  }
static bool Deveel.Data.Sql.Objects.SqlNumber.TryParse ( string  s,
out SqlNumber  value 
)
inlinestatic

Definition at line 702 of file SqlNumber.cs.

702  {
703  if (String.IsNullOrEmpty(s)) {
704  value = Null;
705  return false;
706  }
707 
708  if (string.Equals(s, "+Infinity", StringComparison.OrdinalIgnoreCase) ||
709  string.Equals(s, "+Inf", StringComparison.OrdinalIgnoreCase) ||
710  string.Equals(s, "Infinity", StringComparison.OrdinalIgnoreCase)) {
711  value = PositiveInfinity;
712  return true;
713  }
714 
715  if (string.Equals(s, "-Infinity", StringComparison.OrdinalIgnoreCase) ||
716  string.Equals(s, "-Inf", StringComparison.OrdinalIgnoreCase)) {
717  value = NegativeInfinity;
718  return true;
719  }
720 
721  if (string.Equals(s, "NaN", StringComparison.OrdinalIgnoreCase) ||
722  string.Equals(s, "NotANumber", StringComparison.OrdinalIgnoreCase)) {
723  value = NaN;
724  return true;
725  }
726 
727  BigDecimal decimalValue;
728 
729  if (!BigDecimal.TryParse(s, out decimalValue)) {
730  value = Null;
731  return false;
732  }
733 
734  value = new SqlNumber(NumericState.None, decimalValue);
735  return true;
736  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
A long string in the system.
bool Equals(SqlNumber other)
Definition: SqlNumber.cs:181
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
static readonly SqlNumber NaN
Definition: SqlNumber.cs:33
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
static readonly SqlNumber NegativeInfinity
Definition: SqlNumber.cs:35
static readonly SqlNumber PositiveInfinity
Definition: SqlNumber.cs:37
SqlNumber Deveel.Data.Sql.Objects.SqlNumber.XOr ( SqlNumber  value)
inline

Definition at line 471 of file SqlNumber.cs.

471  {
472  if (State == NumericState.NotANumber)
473  return this;
474 
475  if (Scale == 0 && value.Scale == 0) {
476  BigInteger bi1 = innerValue.ToBigInteger();
477  BigInteger bi2 = value.innerValue.ToBigInteger();
478  return new SqlNumber(NumericState.None, new BigDecimal(bi1.XOr(bi2)));
479  }
480 
481  return Null;
482  }
NumericState
Lists all the possible special states of a number.
Definition: NumericState.cs:21
SqlNumber(BigDecimal value)
Definition: SqlNumber.cs:39
readonly BigDecimal innerValue
Definition: SqlNumber.cs:25
static readonly SqlNumber Null
Definition: SqlNumber.cs:31

Member Data Documentation

readonly int Deveel.Data.Sql.Objects.SqlNumber.byteCount
private

Definition at line 26 of file SqlNumber.cs.

readonly BigDecimal Deveel.Data.Sql.Objects.SqlNumber.innerValue
private

Definition at line 25 of file SqlNumber.cs.

readonly SqlNumber Deveel.Data.Sql.Objects.SqlNumber.NaN = new SqlNumber(NumericState.NotANumber, null)
static

Definition at line 33 of file SqlNumber.cs.

readonly SqlNumber Deveel.Data.Sql.Objects.SqlNumber.NegativeInfinity = new SqlNumber(NumericState.NegativeInfinity, null)
static

Definition at line 35 of file SqlNumber.cs.

readonly SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Null = new SqlNumber(NumericState.None, null)
static

Definition at line 31 of file SqlNumber.cs.

readonly SqlNumber Deveel.Data.Sql.Objects.SqlNumber.One = new SqlNumber(NumericState.None, BigDecimal.One)
static

Definition at line 30 of file SqlNumber.cs.

readonly SqlNumber Deveel.Data.Sql.Objects.SqlNumber.PositiveInfinity = new SqlNumber(NumericState.PositiveInfinity, null)
static

Definition at line 37 of file SqlNumber.cs.

readonly long Deveel.Data.Sql.Objects.SqlNumber.valueAsLong
private

Definition at line 27 of file SqlNumber.cs.

readonly SqlNumber Deveel.Data.Sql.Objects.SqlNumber.Zero = new SqlNumber(NumericState.None, BigDecimal.Zero)
static

Definition at line 29 of file SqlNumber.cs.

Property Documentation

bool Deveel.Data.Sql.Objects.SqlNumber.CanBeInt32
get

Definition at line 117 of file SqlNumber.cs.

bool Deveel.Data.Sql.Objects.SqlNumber.CanBeInt64
get

Definition at line 113 of file SqlNumber.cs.

bool Deveel.Data.Sql.Objects.SqlNumber.IsNull
get

Definition at line 165 of file SqlNumber.cs.

MathContext Deveel.Data.Sql.Objects.SqlNumber.MathContext
getprivate

Definition at line 129 of file SqlNumber.cs.

int Deveel.Data.Sql.Objects.SqlNumber.Precision
get

Definition at line 125 of file SqlNumber.cs.

int Deveel.Data.Sql.Objects.SqlNumber.Scale
get

Definition at line 121 of file SqlNumber.cs.

int Deveel.Data.Sql.Objects.SqlNumber.Sign
get

Definition at line 133 of file SqlNumber.cs.

NumericState Deveel.Data.Sql.Objects.SqlNumber.State
getprivate set

Definition at line 111 of file SqlNumber.cs.


The documentation for this struct was generated from the following file: