2 // System.Data.SqlTypes.SqlInt64
5 // Tim Coleman <tim@timcoleman.com>
7 // (C) Copyright 2002 Tim Coleman
12 namespace System.Data.SqlTypes
14 public struct SqlInt64 : INullable, IComparable
19 public static readonly SqlInt64 MaxValue; // 2^63 - 1
20 public static readonly SqlInt64 MinValue; // -2^63
21 public static readonly SqlInt64 Null;
22 public static readonly SqlInt64 Zero = new SqlInt64 (0);
28 public SqlInt64 (long value)
39 get { throw new NotImplementedException (); }
50 public static SqlInt64 Add (SqlInt64 x, SqlInt64 y)
55 public static SqlInt64 BitwiseAnd (SqlInt64 x, SqlInt64 y)
60 public static SqlInt64 BitwiseOr (SqlInt64 x, SqlInt64 y)
66 public int CompareTo (object value)
68 throw new NotImplementedException ();
71 public static SqlInt64 Divide (SqlInt64 x, SqlInt64 y)
77 public override bool Equals (object value)
79 throw new NotImplementedException ();
82 public static SqlBoolean Equals (SqlInt64 x, SqlInt64 y)
88 public override int GetHashCode ()
93 public static SqlBoolean GreaterThan (SqlInt64 x, SqlInt64 y)
98 public static SqlBoolean GreaterThanOrEqual (SqlInt64 x, SqlInt64 y)
103 public static SqlBoolean LessThan (SqlInt64 x, SqlInt64 y)
108 public static SqlBoolean LessThanOrEqual (SqlInt64 x, SqlInt64 y)
113 public static SqlInt64 Multiply (SqlInt64 x, SqlInt64 y)
118 public static SqlBoolean NotEquals (SqlInt64 x, SqlInt64 y)
123 public static SqlInt64 OnesComplement (SqlInt64 x)
129 public static SqlInt64 Parse (string s)
131 throw new NotImplementedException ();
134 public static SqlInt64 Subtract (SqlInt64 x, SqlInt64 y)
139 public static SqlBoolean ToSqlBoolean ()
141 if (value != 0) return SqlBoolean.True;
142 if (value == 0) return SqlBoolean.False;
144 return SqlBoolean.Null;
148 public static SqlByte ToSqlByte ()
150 throw new NotImplementedException ();
154 public static SqlDecimal ToSqlDecimal ()
156 throw new NotImplementedException ();
160 public static SqlDouble ToSqlDouble ()
162 throw new NotImplementedException ();
166 public static SqlInt16 ToSqlInt16 ()
168 throw new NotImplementedException ();
172 public static SqlInt32 ToSqlInt32 ()
174 throw new NotImplementedException ();
178 public static SqlMoney ToSqlMoney ()
180 throw new NotImplementedException ();
184 public static SqlSingle ToSqlSingle ()
186 throw new NotImplementedException ();
190 public static SqlString ToSqlString ()
192 throw new NotImplementedException ();
196 public override string ToString ()
198 throw new NotImplementedException ();
201 public static SqlInt64 Xor (SqlInt64 x, SqlInt64 y)
206 public static SqlInt64 operator + (SqlInt64 x, SqlInt64 y)
208 return new SqlInt64 (x.Value + y.Value);
211 public static SqlInt64 operator & (SqlInt64 x, SqlInt64 y)
213 return new SqlInt64 (x.value & y.Value);
216 public static SqlInt64 operator | (SqlInt64 x, SqlInt64 y)
218 return new SqlInt64 (x.value | y.Value);
221 public static SqlInt64 operator / (SqlInt64 x, SqlInt64 y)
223 return new SqlInt64 (x.Value / y.Value);
226 public static SqlBoolean operator == (SqlInt64 x, SqlInt64 y)
228 if (x == null || y == null) return SqlBoolean.Null;
229 return new SqlBoolean (x.Value == y.Value);
232 public static SqlInt64 operator ^ (SqlInt64 x, SqlInt64 y)
234 return new SqlInt64 (x.Value ^ y.Value);
237 public static SqlBoolean operator > (SqlInt64 x, SqlInt64 y)
239 if (x == null || y == null) return SqlBoolean.Null;
240 return new SqlBoolean (x.Value > y.Value);
243 public static SqlBoolean operator >= (SqlInt64 x, SqlInt64 y)
245 if (x == null || y == null) return SqlBoolean.Null;
246 return new SqlBoolean (x.Value >= y.Value);
249 public static SqlBoolean operator != (SqlInt64 x, SqlInt64 y)
251 if (x == null || y == null) return SqlBoolean.Null;
252 return new SqlBoolean (!(x.Value == y.Value));
255 public static SqlBoolean operator < (SqlInt64 x, SqlInt64 y)
257 if (x == null || y == null) return SqlBoolean.Null;
258 return new SqlBoolean (x.Value < y.Value);
261 public static SqlBoolean operator <= (SqlInt64 x, SqlInt64 y)
263 if (x == null || y == null) return SqlBoolean.Null;
264 return new SqlBoolean (x.Value <= y.Value);
267 public static SqlInt64 operator % (SqlInt64 x, SqlInt64 y)
269 return new SqlInt64(x.Value % y.Value);
272 public static SqlInt64 operator * (SqlInt64 x, SqlInt64 y)
274 return new SqlInt64 (x.Value * y.Value);
277 public static SqlInt64 operator ~ (SqlInt64 x)
279 return new SqlInt64 (~(x.Value));
282 public static SqlInt64 operator - (SqlInt64 x, SqlInt64 y)
284 return new SqlInt64 (x.Value - y.Value);
287 public static SqlInt64 operator - (SqlInt64 n)
289 return new SqlInt64 (-(n.Value));
293 public static explicit operator SqlInt64 (SqlBoolean x)
295 return new NotImplementedException ();
299 public static explicit operator SqlInt64 (SqlDecimal x)
301 return new NotImplementedException ();
305 public static explicit operator SqlInt64 (SqlDouble x)
307 return new NotImplementedException ();
310 public static explicit operator long (SqlInt64 x)
316 public static explicit operator SqlInt64 (SqlMoney x)
318 return new NotImplementedException ();
322 public static explicit operator SqlInt64 (SqlSingle x)
324 return new NotImplementedException ();
328 public static explicit operator SqlInt64 (SqlString x)
330 return new NotImplementedException ();
333 public static explicit operator SqlInt64 (long x)
335 return new SqlInt64 (x);
339 public static explicit operator SqlInt64 (SqlByte x)
341 return new NotImplementedException ();
345 public static explicit operator SqlInt64 (SqlInt16 x)
347 return new NotImplementedException ();
351 public static explicit operator SqlInt64 (SqlInt32 x)
353 return new NotImplementedException ();