+2003-06-02 Ville Palo <vi64pa@kolumbus.fi>
+
+ * SqlString.cs: implementes less than and greater than operators.
+ Added some checks to ctor.
+
2003-06-01 Ville Palo <vi64pa@kolumbus.fi>
* SqlString.cs: added null checking
chars = new char [(count - index) / 2];
else
chars = new char [count - index];
-
+
+ if (index >= data.Length)
+ throw new ArgumentOutOfRangeException ("index");
+
+ if ((index + count) > data.Length)
+ throw new ArgumentOutOfRangeException ("count");
+
int j = 0;
for (int i = index; i < chars.Length; i++) {
if (x.IsNull || y.IsNull)
return SqlBoolean.Null;
else
- throw new NotImplementedException ();
+ return new SqlBoolean (x.CompareTo (y) > 0);
}
// Greater Than Or Equal
if (x.IsNull || y.IsNull)
return SqlBoolean.Null;
else
- throw new NotImplementedException ();
+ return new SqlBoolean (x.CompareTo (y) >= 0);
}
public static SqlBoolean operator != (SqlString x, SqlString y)
if (x.IsNull || y.IsNull)
return SqlBoolean.Null;
else
- throw new NotImplementedException ();
+ return new SqlBoolean (x.CompareTo (y) < 0);
}
// Less Than Or Equal
if (x.IsNull || y.IsNull)
return SqlBoolean.Null;
else
- throw new NotImplementedException ();
+ return new SqlBoolean (x.CompareTo (y) <= 0);
}
// **************************************