2002-05-02 Rodrigo Moya <rodrigo@ximian.com>
authorRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Thu, 2 May 2002 19:34:25 +0000 (19:34 -0000)
committerRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Thu, 2 May 2002 19:34:25 +0000 (19:34 -0000)
* System.Data/DataViewSettingCollection.cs: implemented.

* System.Data/DataRowView.cs: new stubs.

* System.Data.SqlTypes/SqlByte.cs:
* System.Data.SqlTypes/SqlDateTime.cs:
* System.Data.SqlTypes/SqlDecimal.cs:
* System.Data.SqlTypes/SqlDouble.cs:
* System.Data.SqlTypes/SqlGuid.cs:
* System.Data.SqlTypes/SqlInt16.cs:
* System.Data.SqlTypes/SqlInt64.cs:
* System.Data.SqlTypes/SqlMoney.cs:
* System.Data.SqlTypes/SqlSingle.cs: new stubs, contributed
by Tim Coleman <tcoleman@opentext.com>

* System.Data.build: excluded newly-added files.

svn path=/trunk/mcs/; revision=4234

13 files changed:
mcs/class/System.Data/ChangeLog
mcs/class/System.Data/System.Data.SqlTypes/SqlByte.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlDateTime.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlDouble.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlGuid.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.SqlTypes/SqlSingle.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data.build
mcs/class/System.Data/System.Data/DataRowView.cs [new file with mode: 0644]
mcs/class/System.Data/System.Data/DataViewSettingCollection.cs

index 666eb8df071f577a70d8018f109483e105742bf6..d2af76049bf3bd3d74ea2112fd6c10ae336a886d 100644 (file)
@@ -1,3 +1,22 @@
+2002-05-02  Rodrigo Moya <rodrigo@ximian.com>
+
+       * System.Data/DataViewSettingCollection.cs: implemented.
+
+       * System.Data/DataRowView.cs: new stubs.
+
+       * System.Data.SqlTypes/SqlByte.cs:
+       * System.Data.SqlTypes/SqlDateTime.cs:
+       * System.Data.SqlTypes/SqlDecimal.cs:
+       * System.Data.SqlTypes/SqlDouble.cs:
+       * System.Data.SqlTypes/SqlGuid.cs:
+       * System.Data.SqlTypes/SqlInt16.cs:
+       * System.Data.SqlTypes/SqlInt64.cs:
+       * System.Data.SqlTypes/SqlMoney.cs:
+       * System.Data.SqlTypes/SqlSingle.cs: new stubs, contributed
+       by Tim Coleman <tcoleman@opentext.com>
+
+       * System.Data.build: excluded newly-added files.
+
 2002-05-02  Daniel Morgan <danmorg@sc.rr.com>
 
        * System.Data.SqlClient/PostgresLibrary.cs: included new 
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlByte.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlByte.cs
new file mode 100644 (file)
index 0000000..30f1be5
--- /dev/null
@@ -0,0 +1,359 @@
+//
+// System.Data.SqlTypes.SqlByte
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlByte : INullable, IComparable
+       {
+               #region Fields
+               private byte value;
+
+               public static readonly SqlByte MaxValue = new SqlByte (0xff);
+               public static readonly SqlByte MinValue = new SqlByte (0);
+               public static readonly SqlByte Null;
+               public static readonly SqlByte Zero = new SqlByte (0);
+
+               #endregion
+
+               #region Constructors
+
+               public SqlByte (byte value) 
+               {
+                       this.value = value;
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull {
+                       get { throw new NotImplementedException (); }
+               }
+
+               public byte Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               public static SqlByte Add (SqlByte x, SqlByte y)
+               {
+                       return (x + y);
+               }
+
+               public static SqlByte BitwiseAnd (SqlByte x, SqlByte y)
+               {
+                       return (x & y);
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlByte Divide (SqlByte x, SqlByte y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlByte x, SqlByte y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlByte x, SqlByte y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlByte x, SqlByte y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlByte x, SqlByte y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlByte x, SqlByte y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlByte Mod (SqlByte x, SqlByte y)
+               {
+                       return (x % y);
+               }
+
+               public static SqlByte Multiply (SqlByte x, SqlByte y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlByte x, SqlByte y)
+               {
+                       return (x != y);
+               }
+
+               public static SqlByte OnesComplement (SqlByte x)
+               {
+                       return ~x;
+               }
+
+               [MonoTODO]
+               public static SqlByte Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlByte Subtract (SqlByte x, SqlByte y)
+               {
+                       return (x - y);
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlDecimal ToSqlDecimal ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDouble ToSqlDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlInt16 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt64 ToSqlInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlMoney ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlSingle ToSqlSingle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlByte Xor (SqlByte x, SqlByte y)
+               {
+                       return (x ^ y);
+               }
+
+               public static SqlByte operator + (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value + y.Value);
+               }
+
+               public static SqlByte operator & (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value & y.Value);
+               }
+
+               public static SqlByte operator | (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value | y.Value);
+               }
+
+               public static SqlByte operator / (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlByte x, SqlByte y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlByte operator ^ (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value ^ y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlByte x, SqlByte y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlByte x, SqlByte y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlByte x, SqlByte y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlByte x, SqlByte y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlByte x, SqlByte y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlByte operator % (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value % y.Value);
+               }
+
+               public static SqlByte operator * (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value * y.Value);
+               }
+
+               //public static SqlByte operator ~ (SqlByte x)
+               //{
+                       //return new SqlByte (~(x.Value));
+               //}
+
+               public static SqlByte operator - (SqlByte x, SqlByte y)
+               {
+                       return new SqlByte (x.Value - y.Value);
+               }
+
+               public static explicit operator SqlByte (SqlBoolean x)
+               {
+                       return new SqlByte (x.ByteValue);
+               }
+
+               public static explicit operator byte (SqlByte x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlDecimal x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlDouble x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlInt16 x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlInt16 x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlInt32 x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlInt64 x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlMoney x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlSingle x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlByte (SqlString x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static explicit operator SqlByte (byte x)
+               {
+                       return new SqlByte (x);
+               }
+               
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlDateTime.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlDateTime.cs
new file mode 100644 (file)
index 0000000..64030b3
--- /dev/null
@@ -0,0 +1,220 @@
+//
+// System.Data.SqlTypes.SqlDateTime
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlDateTime : INullable, IComparable
+       {
+               #region Fields
+               private DateTime value;
+
+               public static readonly SqlDateTime MaxValue = new SqlDateTime (9999,12,31);
+               public static readonly SqlDateTime MinValue = new SqlDateTime (1753,1,1);
+               public static readonly SqlDateTime Null;
+               public static readonly int SQLTicksPerHour;
+               public static readonly int SQLTicksPerMinute;
+               public static readonly int SQLTicksPerSecond;
+
+               #endregion
+
+               #region Constructors
+
+               public SqlDateTime (DateTime value) 
+               {
+                       this.value = value;
+               }
+
+               [MonoTODO]
+               public SqlDateTime (int dayTicks, int timeTicks) 
+               {
+               }
+
+               public SqlDateTime (int year, int month, int day) 
+               {
+                       this.value = new DateTime (year, month, day);
+               }
+
+               public SqlDateTime (int year, int month, int day, int hour, int minute, int second) 
+               {
+                       this.value = new DateTime (year, month, day, hour, minute, second);
+               }
+
+               public SqlDateTime (int year, int month, int day, int hour, int minute, int second, double millisecond) 
+               {
+                       this.value = new DateTime (year, month, day, hour, minute, second, millisecond);
+               }
+
+               [MonoTODO]
+               public SqlDateTime (int year, int month, int day, int hour, int minute, int second, int bilisecond) 
+               {
+                       return new NotImplementedException();
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public int DayTicks {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public byte IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public int TimeTicks {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public int Value {
+                       get { throw new NotImplementedException (); }
+               }
+
+               #endregion
+
+               #region Methods
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlDateTime x, SqlDateTime y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return 42;
+               }
+
+               public static SqlBoolean GreaterThan (SqlDateTime x, SqlDateTime y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlDateTime x, SqlDateTime y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlDateTime x, SqlDateTime y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlDateTime x, SqlDateTime y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlBoolean NotEquals (SqlDateTime x, SqlDateTime y)
+               {
+                       return (x != y);
+               }
+
+               [MonoTODO]
+               public static SqlDateTime Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean ToSqlString ()
+               {
+                       return new SqlString (value.ToString ());
+               }
+
+               public override string ToString ()
+               {       
+                       return value.ToString ();
+               }
+               
+               public static SqlDateTime operator + (SqlDateTime x, TimeSpan t)
+               {
+                       if (x == null || t == null) return SqlByte.Null;
+                       return new SqlDateTime (x.Value + t);
+               }
+
+               public static SqlBoolean operator == (SqlDateTime x, SqlDateTime y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlDateTime x, SqlDateTime y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlDateTime x, SqlDateTime y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlDateTime x, SqlDateTime y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlDateTime x, SqlDateTime y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlDateTime x, SqlDateTime y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlByte operator - (SqlDateTime x, TimeSpan t)
+               {
+                       if (x == null || t == null) return SqlByte.Null;
+                       return new SqlDateTime (x.Value + t);
+               }
+
+               public static explicit operator DateTime (SqlDateTime x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDateTime (SqlString x)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public static explicit operator SqlDateTime (DateTime x)
+               {
+                       return new SqlDateTime (x);
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs
new file mode 100644 (file)
index 0000000..dd9e099
--- /dev/null
@@ -0,0 +1,421 @@
+//
+// System.Data.SqlTypes.SqlDecimal
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlDecimal : INullable, IComparable
+       {
+               #region Fields
+               private decimal value;
+
+               public static readonly byte MaxPrecision = 38; 
+               public static readonly byte MaxScale; 
+               public static readonly SqlDecimal MaxValue;
+               public static readonly SqlDecimal MinValue;
+               public static readonly SqlDecimal Null;
+
+               #endregion
+
+               #region Constructors
+
+               public SqlDecimal (decimal value) 
+               {
+                       this.value = value;
+               }
+
+               [MonoTODO]
+               public SqlDecimal (double value) 
+               {
+                       throw new NotImplementedException();
+               }
+
+               [MonoTODO]
+               public SqlDecimal (int value) 
+               {
+                       throw new NotImplementedException();
+               }
+
+               [MonoTODO]
+               public SqlDecimal (long value) 
+               {
+                       throw new NotImplementedException();
+               }
+
+               [MonoTODO]
+               public SqlDecimal (byte bPrecision, byte bScale, bool fPositive, int[] bits)
+               {
+                       throw new NotImplementedException();
+               }
+
+               [MonoTODO]
+               public SqlDecimal (byte bPrecision, byte bScale, bool fPositive, int data1, int data2, int data3, int data4) 
+               {
+                       throw new NotImplementedException();
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public byte[] BinData {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public byte[] Data { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public bool IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public bool IsPositive { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public byte Precision { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public byte Scale { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public byte Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               [MonoTODO]
+               public static SqlDecimal Abs (SqlDecimal n)
+               {
+                       return new NotImplementedException();
+               }
+
+               public static SqlDecimal Add (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x + y);
+               }
+
+               [MonoTODO]
+               public static SqlDecimal Ceiling (SqlDecimal n)
+               {
+                       return new NotImplementedException();
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal ConvertToPrecScale (SqlDecimal n, int precision, int scale)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDecimal Divide (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public static SqlDecimal Floor (SqlDecimal n)
+               {
+                       return new NotImplementedException();
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlDecimal Multiply (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x != y);
+               }
+
+               [MonoTODO]
+               public static SqlDecimal Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal Power (SqlDecimal n, double exp)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal Round (SqlDecimal n, int position)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 Sign (SqlDecimal n)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDecimal Subtract (SqlDecimal x, SqlDecimal y)
+               {
+                       return (x - y);
+               }
+
+               [MonoTODO]
+               public static double ToDouble ()
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlByte ToSqlByte ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDouble ToSqlDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlInt16 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt64 ToSqlInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlMoney ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlSingle ToSqlSingle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal Truncate (SqlDecimal n, int position)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDecimal operator + (SqlDecimal x, SqlDecimal y)
+               {
+                       return new SqlDecimal (x.Value + y.Value);
+               }
+
+               public static SqlDecimal operator / (SqlDecimal x, SqlDecimal y)
+               {
+                       return new SqlDecimal (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlDecimal x, SqlDecimal y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlDecimal x, SqlDecimal y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlDecimal x, SqlDecimal y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlDecimal x, SqlDecimal y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlDecimal x, SqlDecimal y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlDecimal x, SqlDecimal y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlDecimal operator * (SqlDecimal x, SqlDecimal y)
+               {
+                       return new SqlDecimal (x.Value * y.Value);
+               }
+
+               public static SqlDecimal operator - (SqlDecimal x, SqlDecimal y)
+               {
+                       return new SqlDecimal (x.Value - y.Value);
+               }
+
+               public static SqlDecimal operator - (SqlDecimal n)
+               {
+                       return new SqlDecimal (-(n.Value));
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlBoolean x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator Decimal (SqlDecimal n)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlDouble x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlSingle x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlString x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator SqlDecimal (decimal x)
+               {
+                       return new SqlDecimal (x);
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlByte x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlInt16 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlInt32 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlInt64 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDecimal (SqlMoney x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlDouble.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlDouble.cs
new file mode 100644 (file)
index 0000000..9de850c
--- /dev/null
@@ -0,0 +1,315 @@
+//
+// System.Data.SqlTypes.SqlDouble
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlDouble : INullable, IComparable
+       {
+               #region Fields
+               private double value;
+
+               public static readonly SqlDouble MaxValue = new SqlDouble (1.79E+308);
+               public static readonly SqlDouble MinValue = new SqlDouble (-1.79E+308);
+               public static readonly SqlDouble Null;
+               public static readonly SqlDouble Zero = new SqlDouble (0);
+
+               #endregion
+
+               #region Constructors
+
+               public SqlDouble (double value) 
+               {
+                       this.value = value;
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public double Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               public static SqlDouble Add (SqlDouble x, SqlDouble y)
+               {
+                       return (x + y);
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDouble Divide (SqlDouble x, SqlDouble y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlDouble x, SqlDouble y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlDouble x, SqlDouble y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlDouble x, SqlDouble y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlDouble x, SqlDouble y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlDouble x, SqlDouble y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlDouble Multiply (SqlDouble x, SqlDouble y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlDouble x, SqlDouble y)
+               {
+                       return (x != y);
+               }
+
+               [MonoTODO]
+               public static SqlDouble Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDouble Subtract (SqlDouble x, SqlDouble y)
+               {
+                       return (x - y);
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlByte ToSqlByte ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal ToSqlDecimal ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlInt16 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt64 ToSqlInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlMoney ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlSingle ToSqlSingle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDouble operator + (SqlDouble x, SqlDouble y)
+               {
+                       return new SqlDouble (x.Value + y.Value);
+               }
+
+               public static SqlDouble operator / (SqlDouble x, SqlDouble y)
+               {
+                       return new SqlDouble (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlDouble x, SqlDouble y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlDouble x, SqlDouble y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlDouble x, SqlDouble y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlDouble x, SqlDouble y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlDouble x, SqlDouble y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlDouble x, SqlDouble y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlDouble operator * (SqlDouble x, SqlDouble y)
+               {
+                       return new SqlDouble (x.Value * y.Value);
+               }
+
+               public static SqlDouble operator - (SqlDouble x, SqlDouble y)
+               {
+                       return new SqlDouble (x.Value - y.Value);
+               }
+
+               public static SqlDouble operator - (SqlDouble n)
+               {
+                       return new SqlDouble (-(n.Value));
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlBoolean x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator double (SqlDouble x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlString x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (double x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlByte x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlDecimal x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlInt16 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlInt32 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlInt64 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlMoney x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlDouble (SqlSingle x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlGuid.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlGuid.cs
new file mode 100644 (file)
index 0000000..fefe86b
--- /dev/null
@@ -0,0 +1,201 @@
+//
+// System.Data.SqlTypes.SqlGuid
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlGuid : INullable, IComparable
+       {
+               #region Fields
+               private Guid value;
+
+               public static readonly SqlGuid Null;
+
+               #endregion
+
+               #region Constructors
+
+               public SqlGuid (byte[] value) 
+               {
+                       this.value = new Guid (value);
+               }
+
+               public SqlGuid (Guid g) 
+               {
+                       this.value = g;
+               }
+
+               public SqlGuid (string s) 
+               {
+                       this.value = new Guid (s);
+               }
+
+               public SqlGuid (int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k) 
+               {
+                       this.value = new Guid (a, b, c, d, e, f, g, h, i, j, k);
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull {
+                       get { throw new NotImplementedException (); }
+               }
+
+               public Guid Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlGuid x, SqlGuid y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return 42;
+               }
+
+               public static SqlBoolean GreaterThan (SqlGuid x, SqlGuid y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlGuid x, SqlGuid y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlGuid x, SqlGuid y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlGuid x, SqlGuid y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlBoolean NotEquals (SqlGuid x, SqlGuid y)
+               {
+                       return (x != y);
+               }
+
+               [MonoTODO]
+               public static SqlGuid Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public byte[] ToByteArray()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlBinary ToSqlBinary ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean operator == (SqlGuid x, SqlGuid y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlGuid x, SqlGuid y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlGuid x, SqlGuid y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlGuid x, SqlGuid y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlGuid x, SqlGuid y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlGuid x, SqlGuid y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlGuid (SqlBinary x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static explicit operator Guid (SqlGuid x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlGuid (SqlString x)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static explicit operator SqlGuid (Guid x)
+               {
+                       return new Guid (x);
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs
new file mode 100644 (file)
index 0000000..964c3aa
--- /dev/null
@@ -0,0 +1,359 @@
+//
+// System.Data.SqlTypes.SqlInt16
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlInt16 : INullable, IComparable
+       {
+               #region Fields
+               private short value;
+
+               public static readonly SqlInt16 MaxValue = new SqlInt16 (32767);
+               public static readonly SqlInt16 MinValue = new SqlInt16 (-32768);
+               public static readonly SqlInt16 Null;
+               public static readonly SqlInt16 Zero = new SqlInt16 (0);
+
+               #endregion
+
+               #region Constructors
+
+               public SqlInt16 (short value) 
+               {
+                       this.value = value;
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public short Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               public static SqlInt16 Add (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x + y);
+               }
+
+               public static SqlInt16 BitwiseAnd (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x & y);
+               }
+
+               public static SqlInt16 BitwiseOr (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x | y);
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlInt16 Divide (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlInt16 Mod (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x % y);
+               }
+
+               public static SqlInt16 Multiply (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x != y);
+               }
+
+               public static SqlInt16 OnesComplement (SqlInt16 x)
+               {
+                       return ~x;
+               }
+
+               [MonoTODO]
+               public static SqlInt16 Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlInt16 Subtract (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x - y);
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlByte ToSqlByte ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal ToSqlDecimal ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt64 ToSqlInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlMoney ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlSingle ToSqlSingle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlInt16 Xor (SqlInt16 x, SqlInt16 y)
+               {
+                       return (x ^ y);
+               }
+
+               public static SqlInt16 operator + (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.Value + y.Value);
+               }
+
+               public static SqlInt16 operator & (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.value & y.Value);
+               }
+
+               public static SqlInt16 operator | (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.value | y.Value);
+               }
+
+               public static SqlInt16 operator / (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlInt16 x, SqlInt16 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlInt16 operator ^ (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.Value ^ y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlInt16 x, SqlInt16 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlInt16 x, SqlInt16 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlInt16 x, SqlInt16 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlInt16 x, SqlInt16 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlInt16 x, SqlInt16 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlInt16 operator % (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.Value % y.Value);
+               }
+
+               public static SqlInt16 operator * (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.Value * y.Value);
+               }
+
+               public static SqlInt16 operator ~ (SqlInt16 x)
+               {
+                       return new SqlInt16 (~(x.Value));
+               }
+
+               public static SqlInt16 operator - (SqlInt16 x, SqlInt16 y)
+               {
+                       return new SqlInt16 (x.Value - y.Value);
+               }
+
+               public static SqlInt16 operator - (SqlInt16 n)
+               {
+                       return new SqlInt16 (-(n.Value));
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlBoolean x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlDecimal x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlDouble x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlInt32 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlInt64 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlMoney x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlSingle x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlString x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator SqlInt16 (short x)
+               {
+                       return new SqlInt16 (x);
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt16 (SqlByte x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs
new file mode 100644 (file)
index 0000000..282be5c
--- /dev/null
@@ -0,0 +1,359 @@
+//
+// System.Data.SqlTypes.SqlInt64
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlInt64 : INullable, IComparable
+       {
+               #region Fields
+               private long value;
+
+               public static readonly SqlInt64 MaxValue; // 2^63 - 1
+               public static readonly SqlInt64 MinValue; // -2^63
+               public static readonly SqlInt64 Null;
+               public static readonly SqlInt64 Zero = new SqlInt64 (0);
+
+               #endregion
+
+               #region Constructors
+
+               public SqlInt64 (long value) 
+               {
+                       this.value = value;
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public long Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               public static SqlInt64 Add (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x + y);
+               }
+
+               public static SqlInt64 BitwiseAnd (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x & y);
+               }
+
+               public static SqlInt64 BitwiseOr (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x | y);
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlInt64 Divide (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlInt64 Multiply (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x != y);
+               }
+
+               public static SqlInt64 OnesComplement (SqlInt64 x)
+               {
+                       return ~x;
+               }
+
+               [MonoTODO]
+               public static SqlInt64 Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlInt64 Subtract (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x - y);
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlByte ToSqlByte ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal ToSqlDecimal ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDouble ToSqlDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlInt16 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlMoney ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlSingle ToSqlSingle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlInt64 Xor (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x ^ y);
+               }
+
+               public static SqlInt64 operator + (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.Value + y.Value);
+               }
+
+               public static SqlInt64 operator & (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.value & y.Value);
+               }
+
+               public static SqlInt64 operator | (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.value | y.Value);
+               }
+
+               public static SqlInt64 operator / (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlInt64 x, SqlInt64 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlInt64 operator ^ (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.Value ^ y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlInt64 x, SqlInt64 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlInt64 x, SqlInt64 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlInt64 x, SqlInt64 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlInt64 x, SqlInt64 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlInt64 x, SqlInt64 y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlInt64 operator % (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64(x.Value % y.Value);
+               }
+
+               public static SqlInt64 operator * (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.Value * y.Value);
+               }
+
+               public static SqlInt64 operator ~ (SqlInt64 x)
+               {
+                       return new SqlInt64 (~(x.Value));
+               }
+
+               public static SqlInt64 operator - (SqlInt64 x, SqlInt64 y)
+               {
+                       return new SqlInt64 (x.Value - y.Value);
+               }
+
+               public static SqlInt64 operator - (SqlInt64 n)
+               {
+                       return new SqlInt64 (-(n.Value));
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlBoolean x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlDecimal x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlDouble x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator long (SqlInt64 x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlMoney x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlSingle x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlString x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator SqlInt64 (long x)
+               {
+                       return new SqlInt64 (x);
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlByte x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlInt16 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlInt64 (SqlInt32 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs
new file mode 100644 (file)
index 0000000..7d57f20
--- /dev/null
@@ -0,0 +1,354 @@
+//
+// System.Data.SqlTypes.SqlMoney
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlMoney : INullable, IComparable
+       {
+               #region Fields
+               private decimal value;
+
+               public static readonly SqlMoney MaxValue = new SqlMoney (922337203685475.5807);
+               public static readonly SqlMoney MinValue = new SqlMoney (-922337203685477.5808);
+               public static readonly SqlMoney Null;
+               public static readonly SqlMoney Zero = new SqlMoney (0);
+
+               #endregion
+
+               #region Constructors
+
+               public SqlMoney (decimal value) 
+               {
+                       this.value = value;
+               }
+
+               [MonoTODO]
+               public SqlMoney (double value) 
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public SqlMoney (int value) 
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public SqlMoney (long value) 
+               {
+                       throw new NotImplementedException ();
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public decimal Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               public static SqlMoney Add (SqlMoney x, SqlMoney y)
+               {
+                       return (x + y);
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlMoney Divide (SqlMoney x, SqlMoney y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlMoney x, SqlMoney y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlMoney x, SqlMoney y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlMoney x, SqlMoney y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlMoney x, SqlMoney y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlMoney x, SqlMoney y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlMoney Multiply (SqlMoney x, SqlMoney y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlMoney x, SqlMoney y)
+               {
+                       return (x != y);
+               }
+
+               [MonoTODO]
+               public static SqlMoney Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlMoney Subtract (SqlMoney x, SqlMoney y)
+               {
+                       return (x - y);
+               }
+
+               public static decimal ToDecimal ()
+               {
+                       return value;
+               }
+
+               [MonoTODO]
+               public static double ToDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static int ToInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static long ToInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlByte ToSqlByte ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlDecimal ToSqlDecimal ()
+               {
+                       return new SqlDecimal (value);
+               }
+
+               [MonoTODO]
+               public static SqlDouble ToSqlDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlInt16 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlSingle ToSqlSingle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlMoney operator + (SqlMoney x, SqlMoney y)
+               {
+                       return new SqlMoney (x.Value + y.Value);
+               }
+
+               public static SqlMoney operator / (SqlMoney x, SqlMoney y)
+               {
+                       return new SqlMoney (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlMoney x, SqlMoney y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlMoney x, SqlMoney y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlMoney x, SqlMoney y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlMoney x, SqlMoney y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlMoney x, SqlMoney y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlMoney x, SqlMoney y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlMoney operator * (SqlMoney x, SqlMoney y)
+               {
+                       return new SqlMoney (x.Value * y.Value);
+               }
+
+               public static SqlMoney operator - (SqlMoney x, SqlMoney y)
+               {
+                       return new SqlMoney (x.Value - y.Value);
+               }
+
+               public static SqlMoney operator - (SqlMoney n)
+               {
+                       return new SqlMoney (-(n.Value));
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlBoolean x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlDecimal x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlDouble x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator decimal (SqlMoney x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlSingle x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlString x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator SqlMoney (decimal x)
+               {
+                       return new SqlMoney (x);
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlByte x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlInt16 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlInt32 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlMoney (SqlInt64 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               #endregion
+       }
+}
+                       
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlSingle.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlSingle.cs
new file mode 100644 (file)
index 0000000..9421546
--- /dev/null
@@ -0,0 +1,322 @@
+//
+// System.Data.SqlTypes.SqlSingle
+//
+// Author:
+//   Tim Coleman <tim@timcoleman.com>
+//
+// (C) Copyright 2002 Tim Coleman
+//
+
+using System;
+
+namespace System.Data.SqlTypes
+{
+       public struct SqlSingle : INullable, IComparable
+       {
+               #region Fields
+
+               private float value;
+
+               public static readonly SqlSingle MaxValue = new SqlSingle (3.40E+38);
+               public static readonly SqlSingle MinValue = new SqlSingle (-3.40E+38);
+               public static readonly SqlSingle Null;
+               public static readonly SqlSingle Zero = new SqlSingle (0);
+
+               #endregion
+
+               #region Constructors
+
+               [MonoTODO]
+               public SqlSingle (double value) 
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public SqlSingle (float value) 
+               {
+                       this.value = value;
+               }
+
+               #endregion
+
+               #region Properties
+
+               [MonoTODO]
+               public bool IsNull { 
+                       get { throw new NotImplementedException (); }
+               }
+
+               public float Value { 
+                       get { return value; }
+               }
+
+               #endregion
+
+               #region Methods
+
+               public static SqlSingle Add (SqlSingle x, SqlSingle y)
+               {
+                       return (x + y);
+               }
+
+               [MonoTODO]
+               public int CompareTo (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlSingle Divide (SqlSingle x, SqlSingle y)
+               {
+                       return (x / y);
+               }
+
+               [MonoTODO]
+               public override bool Equals (object value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlBoolean Equals (SqlSingle x, SqlSingle y)
+               {
+                       return (x == y);
+               }
+
+               [MonoTODO]
+               public override int GetHashCode ()
+               {
+                       return (int)value;
+               }
+
+               public static SqlBoolean GreaterThan (SqlSingle x, SqlSingle y)
+               {
+                       return (x > y);
+               }
+
+               public static SqlBoolean GreaterThanOrEqual (SqlSingle x, SqlSingle y)
+               {
+                       return (x >= y);
+               }
+
+               public static SqlBoolean LessThan (SqlSingle x, SqlSingle y)
+               {
+                       return (x < y);
+               }
+
+               public static SqlBoolean LessThanOrEqual (SqlSingle x, SqlSingle y)
+               {
+                       return (x <= y);
+               }
+
+               public static SqlSingle Multiply (SqlSingle x, SqlSingle y)
+               {
+                       return (x * y);
+               }
+
+               public static SqlBoolean NotEquals (SqlSingle x, SqlSingle y)
+               {
+                       return (x != y);
+               }
+
+               [MonoTODO]
+               public static SqlSingle Parse (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlSingle Subtract (SqlSingle x, SqlSingle y)
+               {
+                       return (x - y);
+               }
+
+               public static SqlBoolean ToSqlBoolean ()
+               {
+                       if (value != 0) return SqlBoolean.True;
+                       if (value == 0) return SqlBoolean.False;
+
+                       return SqlBoolean.Null;
+               }
+               
+               [MonoTODO]
+               public static SqlByte ToSqlByte ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDecimal ToSqlDecimal ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlDouble ToSqlDouble ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt16 ToSqlInt16 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt32 ToSqlInt32 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlInt64 ToSqlInt64 ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static SqlMoney ToSqlMoney ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+
+               [MonoTODO]
+               public static SqlString ToSqlString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static SqlSingle operator + (SqlSingle x, SqlSingle y)
+               {
+                       return new SqlSingle (x.Value + y.Value);
+               }
+
+               public static SqlSingle operator / (SqlSingle x, SqlSingle y)
+               {
+                       return new SqlSingle (x.Value / y.Value);
+               }
+
+               public static SqlBoolean operator == (SqlSingle x, SqlSingle y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value == y.Value);
+               }
+
+               public static SqlBoolean operator > (SqlSingle x, SqlSingle y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value > y.Value);
+               }
+
+               public static SqlBoolean operator >= (SqlSingle x, SqlSingle y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value >= y.Value);
+               }
+
+               public static SqlBoolean operator != (SqlSingle x, SqlSingle y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (!(x.Value == y.Value));
+               }
+
+               public static SqlBoolean operator < (SqlSingle x, SqlSingle y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value < y.Value);
+               }
+
+               public static SqlBoolean operator <= (SqlSingle x, SqlSingle y)
+               {
+                       if (x == null || y == null) return SqlBoolean.Null;
+                       return new SqlBoolean (x.Value <= y.Value);
+               }
+
+               public static SqlSingle operator * (SqlSingle x, SqlSingle y)
+               {
+                       return new SqlSingle (x.Value * y.Value);
+               }
+
+               public static SqlSingle operator - (SqlSingle x, SqlSingle y)
+               {
+                       return new SqlSingle (x.Value - y.Value);
+               }
+
+               public static SqlSingle operator - (SqlSingle n)
+               {
+                       return new SqlSingle (-(n.Value));
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlBoolean x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlDouble x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator float (SqlSingle x)
+               {
+                       return x.Value;
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlString x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               public static explicit operator SqlSingle (float x)
+               {
+                       return new SqlSingle (x);
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlByte x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlDecimal x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlInt16 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlInt32 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlInt64 x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static explicit operator SqlSingle (SqlMoney x)
+               {
+                       return new NotImplementedException ();
+               }
+
+               #endregion
+       }
+}
+                       
index 68f93972a8f867ecad97a15e4a96fa336a74a941..2d0dea03e8a87b06274cae14ec6ed2c808e1b6ce 100644 (file)
@@ -33,6 +33,7 @@
                                <excludes name="System.Data/DataTableRelationCollection.cs"/>\r
                                <excludes name="System.Data/DataView.cs"/>\r
                                <excludes name="System.Data/DataViewManager.cs"/>\r
+                               <excludes name="System.Data/DataRowView.cs"/>\r
                                <excludes name="System.Data/DataViewSetting.cs"/>\r
                                <excludes name="System.Data/DataSet.cs"/>\r
                                <excludes name="System.Data/MergeFailedEventArgs.cs"/>\r
diff --git a/mcs/class/System.Data/System.Data/DataRowView.cs b/mcs/class/System.Data/System.Data/DataRowView.cs
new file mode 100644 (file)
index 0000000..9152f1d
--- /dev/null
@@ -0,0 +1,107 @@
+//
+// System.Data.DataRowView.cs
+//
+// Author:
+//    Rodrigo Moya <rodrigo@ximian.com>
+//
+// (C) Ximian, Inc 2002
+//
+
+using System.Collections;
+using System.ComponentModel;
+
+namespace System.Data
+{
+       /// <summary>
+       /// Represents a customized view of a DataRow exposed as a fully featured Windows Forms control.
+       /// </summary>
+       public class DataRowView : ICustomTypeDescriptor, IEditableObject, IDataErrorInfo
+       {
+               [MonoTODO]
+               public void BeginEdit () {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void CancelEdit () {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public DataView CreateChildView (DataRelation relation) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public DataView CreateChildView (string name) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Delete () {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void EndEdit () {
+                       throw new NotImplementedException ();
+               }
+               
+               public DataView DataView {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public bool IsEdit {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public bool IsNew {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public object this[string column] {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+                       [MonoTODO]
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public object this[int column] {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+                       [MonoTODO]
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public DataRow Row {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public DataRowVersion RowVersion {
+                       [MonoTODO]
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+       }
+}
index a9625aa5d86392d0f0706077c5dd2bf411162f21..786f3b858d2f871c6218119161ecd7a67e353d83 100755 (executable)
@@ -3,7 +3,77 @@ using System;
 using System.Collections;
 
 namespace System.Data {
-
+       /// <summary>
+       /// Contains a read-only collection of DataViewSetting objects for each DataTable in a DataSet.
+       /// </summary>
        public class DataViewSettingCollection : ICollection, IEnumerable {
+               private ArrayList settingList;
+
+               public void CopyTo (Array ar, int index) {
+                       settingList.CopyTo (ar, index);
+               }
+
+               [Serializable]
+               public IEnumerator GetEnumerator () {
+                       return settingList.GetEnumerator ();
+               }
+               
+               public virtual int Count {
+                       get {
+                               return settingList.Count;
+                       }
+               }
+
+               public bool IsReadOnly {
+                       get {
+                               return settingList.IsReadOnly;
+                       }
+               }
+
+               public bool IsSynchronized {
+                       get {
+                               return settingList.IsSynchronized;
+                       }
+               }
+
+               public virtual DataViewSetting this[DataTable dt] {
+                       get {
+                               for (int i = 0; i < settingList.Count; i++) {
+                                       DataViewSetting dvs = settingList[i];
+                                       if (dvs.Table == dt)
+                                               return dvs;
+                               }
+                               return null;
+                       }
+                       set {
+                               this[dt] = value;
+                       }
+               }
+
+               public virtual DataViewSetting this[string name] {
+                       get {
+                               for (int i = 0; i < settingList.Count; i++) {
+                                       DataViewSetting dvs = settingList[i];
+                                       if (dvs.Table.TableName == name)
+                                               return dvs;
+                               }
+                               return null;
+                       }
+               }
+
+               public virtual DataViewSetting this[int index] {
+                       get {
+                               return settingList[index];
+                       }
+                       set {
+                               settingList[index] = value;
+                       }
+               }
+
+               public object SyncRoot {
+                       get {
+                               return settingList.SyncRoot;
+                       }
+               }
        }
 }