return rowsAffected;
}
- // FIXME: temporarily commmented out, so I could get a simple working
- // SqlConnection and SqlCommand. I had to temporarily
- // comment it out the ExecuteReader in IDbCommand as well.
- /*
[MonoTODO]
IDataReader IDbCommand.ExecuteReader ()
{
- throw new NotImplementedException ();
+ return ExecuteReader ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (
CommandBehavior behavior)
{
- throw new NotImplementedException ();
+ return ExecuteReader (behavior);
}
[MonoTODO]
{
throw new NotImplementedException ();
}
- */
[MonoTODO]
public object ExecuteScalar ()
#endregion // Destructors
-
#region Properties
public int Depth {
return rowsAffected;
}
- // FIXME: temporarily commmented out, so I could get a simple working
- // SqlConnection and SqlCommand. I had to temporarily
- // comment it out the ExecuteReader in IDbCommand as well.
- /*
[MonoTODO]
IDataReader IDbCommand.ExecuteReader ()
{
- throw new NotImplementedException ();
+ return ExecuteReader ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (
CommandBehavior behavior)
{
- throw new NotImplementedException ();
+ return ExecuteReader (behavior);
}
[MonoTODO]
{
throw new NotImplementedException ();
}
- */
[MonoTODO]
public object ExecuteScalar ()
#endregion // Destructors
-
#region Properties
public int Depth {
+2002-04-28 Daniel Morgan <danmorg@sc.rr.com>
+
+ * System.Data/DataRelation.cs
+ * System.Data/ForeignKeyConstraint.cs
+ * System.Data/UniqueConstraint.cs: added more stubs
+
+ * System.Data/DataTableRelationCollection.cs: added back to cvs
+ and modified for compile errors. DataRelationCollection is an
+ abstract class and there must be a class that implements for
+ DataTable/DataSet. DataTableRelationCollection was changed
+ to an internal class.
+
+ * System.Data.build: modified - new files added
+ also wanted to include files/classes in the build
+ so we can get a compilable forward read only result set.
+ It compiles now using csc/nant with warnings, but this
+ is a start for adding functionality for the result set.
+ Classes associated with/and DataSet are still excluded.
+
+ * TODO: modified - updated to do list for System.Data
+
+ * System.Data/Constraint.cs
+ * System.Data/ConstraintCollection.cs
+ * System.Data/DataRelationCollection.cs
+ * System.Data/DataRow.cs
+ * System.Data/DataRowChangeEventArgs.cs
+ * System.Data/DataRowCollection.cs
+ * System.Data/DataTable.cs
+ * System.Data/DataTableCollection.cs
+ * System.Data/InternalDataCollectionBase.cs
+ * System.Data/PropertyCollection.cs: modified -
+ changes to compile SqlDataReader/DataTable and
+ dependencies
+
+ * System.Data/IDbCommand.cs
+ * System.Data.SqlClient/SqlCommand.cs: modified -
+ un-commented overloaded methods ExecuteReader
+ which returns a SqlDataReader
+
2002-04-28 Rodrigo Moya <rodrigo@ximian.com>
* System.Data/DataTableCollection.cs: more implementation.
return rowsAffected;
}
- // FIXME: temporarily commmented out, so I could get a simple working
- // SqlConnection and SqlCommand. I had to temporarily
- // comment it out the ExecuteReader in IDbCommand as well.
- /*
[MonoTODO]
IDataReader IDbCommand.ExecuteReader ()
{
- throw new NotImplementedException ();
+ return ExecuteReader ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (
CommandBehavior behavior)
{
- throw new NotImplementedException ();
+ return ExecuteReader (behavior);
}
[MonoTODO]
{
throw new NotImplementedException ();
}
- */
[MonoTODO]
public object ExecuteScalar ()
#endregion // Destructors
-
#region Properties
public int Depth {
<arg value="/unsafe"/>\r
<sources>\r
<includes name="**/*.cs"/> \r
+ <!--\r
<excludes name="System.Data/Constraint.cs"/>\r
<excludes name="System.Data/ConstraintCollection.cs"/>\r
<excludes name="System.Data/InternalDataCollectionBase.cs"/>\r
<excludes name="System.Data/DataRow.cs"/>\r
<excludes name="System.Data/DataRowCollection.cs"/>\r
<excludes name="System.Data/DataRowChangeEventArgs.cs"/>\r
- <excludes name="System.Data/DataTableCollection.cs"/>\r
<excludes name="System.Data/DataRelationCollection.cs"/>\r
<excludes name="System.Data/DataTable.cs"/>\r
+ <excludes name="System.Data/PropertyCollection.cs"/>\r
+ -->\r
+ <excludes name="System.Data/DataTableRelationCollection.cs"/>\r
<excludes name="System.Data/DataView.cs"/>\r
<excludes name="System.Data/DataSet.cs"/>\r
- <excludes name="System.Data/PropertyCollection.cs"/>\r
<excludes name="Test/**"/>\r
<excludes name="System.Data.Common/*"/>\r
<excludes name="System.Data.SqlClient/SqlDataAdapter.cs"/>\r
- <excludes name="System.Data.SqlClient/SqlDataReader.cs"/>\r
+ <!--<excludes name="System.Data.SqlClient/SqlDataReader.cs"/>-->\r
<excludes name="System.Data.SqlClient/SqlInfoMessageEventArgs.cs"/>\r
<excludes name="System.Data.SqlClient/SqlRowUpdatingEventArgs.cs"/>\r
<excludes name="System.Data.SqlClient/SqlRowUpdatedEventArgs.cs"/>\r
{
/// <summary>
- /// Determines the action that occurs when the AcceptChanges or RejectChanges method is invoked on a DataTable with a ForeignKeyConstraint.
+ /// Determines the action that occurs when
+ /// the AcceptChanges or RejectChanges method
+ /// is invoked on a DataTable with a ForeignKeyConstraint.
/// </summary>
[Serializable]
public enum AcceptRejectRule
None = 0
}
-}
\ No newline at end of file
+}
using System.Collections;
using System.ComponentModel;
using System.Runtime.InteropServices;
+using System.Runtime.Serialization;
namespace System.Data
{
[Serializable]
public abstract class Constraint {
+ protected string name = null;
+ protected PropertyCollection properties = null;
+
[MonoTODO]
- [Serializable]
protected Constraint() {
+ properties = new PropertyCollection();
}
- [Serializable]
public virtual string ConstraintName {
- [MonoTODO]
+ [MonoTODO]
get{
+ return name;
}
[MonoTODO]
set{
+ name = value;
}
}
- [Serializable]
public PropertyCollection ExtendedProperties {
[MonoTODO]
get {
+ return properties;
}
}
- [Serializable]
public abstract DataTable Table {
get;
}
[MonoTODO]
- [Serializable]
public override string ToString() {
+ return name;
}
- [MonoTODO]
- [Serializable]
- [ClassInterface(ClassInterfaceType.AutoDual)]
- ~Constraint() {
- }
+ //[MonoTODO]
+ //[ClassInterface(ClassInterfaceType.AutoDual)]
+ //~Constraint() {
+ //}
}
}
// Daniel Morgan
//
// (C) Ximian, Inc. 2002
+// (C) 2002 Daniel Morgan
//
using System;
/// </summary>
public class ConstraintCollection : InternalDataCollectionBase {
- [MonoTODO]
- [Serializable]
public virtual Constraint this[string name] {
[MonoTODO]
get {
+ throw new NotImplementedException ();
}
}
-
- [MonoTODO]
- [Serializable]
+
public virtual Constraint this[int index] {
[MonoTODO]
get {
+ throw new NotImplementedException ();
}
}
// Overloaded Add method (5 of them)
// to add Constraint object to the collection
- [Serializable]
[MonoTODO]
public void Add(Constraint constraint) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn column, bool primaryKey) {
+
+ throw new NotImplementedException ();
+
}
- [Serializable]
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn primaryKeyColumn,
DataColumn foreignKeyColumn) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn[] columns, bool primaryKey) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn[] primaryKeyColumns,
DataColumn[] foreignKeyColumns) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public void AddRange(Constraint[] constraints) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public bool CanRemove(Constraint constraint) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public void Clear() {
+
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public bool Contains(string name) {
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public int IndexOf(Constraint constraint) {
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public virtual int IndexOf(string constraintName) {
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public void Remove(Constraint constraint) {
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public void Remove(string name) {
+ throw new NotImplementedException ();
}
- [Serializable]
[MonoTODO]
public void RemoveAt(int index) {
+ throw new NotImplementedException ();
}
- /*
- * FIXME: fix this event
- [Serializable]
[MonoTODO]
public event CollectionChangeEventHandler CollectionChanged;
- */
- [Serializable]
protected override ArrayList List {
[MonoTODO]
get{
+ throw new NotImplementedException ();
}
}
- [Serializable]
[MonoTODO]
protected virtual void OnCollectionChanged(
CollectionChangeEventArgs ccevent) {
- }
+ throw new NotImplementedException ();
+ }
}
}
--- /dev/null
+//
+// System.Data.DataRelation.cs
+//
+// Author:
+// Daniel Morgan <danmorg@sc.rr.com>
+//
+// (C) 2002 Daniel Morgan
+// (C) 2002 Ximian, Inc.
+//
+
+using System;
+using System.Runtime.Serialization;
+
+namespace System.Data
+{
+ /// <summary>
+ /// DataRelation is used for a parent/child relationship
+ /// between two DataTable objects
+ /// </summary>
+ [Serializable]
+ public class DataRelation {
+
+ #region Constructors
+
+ [MonoTODO]
+ public DataRelation(string relationName,
+ DataColumn parentColumn, DataColumn childColumn) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataRelation(string relationName,
+ DataColumn[] parentColumns,
+ DataColumn[] childColumns) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataRelation(string relationName,
+ DataColumn parentColumn, DataColumn childColumn,
+ bool createConstraints) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataRelation(string relationName,
+ DataColumn[] parentColumns, DataColumn[] childColumns,
+ bool createConstraints) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataRelation(string relationName,
+ string parentTableName, string childTableName,
+ string[] parentColumnNames, string[] childColumnNames,
+ bool nested) {
+
+ throw new NotImplementedException ();
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public virtual DataColumn[] ChildColumns {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual ForeignKeyConstraint ChildKeyConstraint {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual DataTable ChildTable {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual DataSet DataSet {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public PropertyCollection ExtendedProperties {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual bool Nested {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual DataColumn[] ParentColumns {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual UniqueConstraint ParentKeyConstraint {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual DataTable ParentTable {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual string RelationName {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ [MonoTODO]
+ public override string ToString() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected void CheckStateForProperty() {
+ throw new NotImplementedException ();
+ }
+
+ #endregion // Methods
+ }
+}
//
// Author:
// Christopher Podurgiel (cpodurgiel@msn.com)
+// Daniel Morgan <danmorg@sc.rr.com>
//
// (C) Chris Podurgiel
+// (C) 2002 Daniel Morgan
//
using System;
{
private bool inTransition;
private int defaultNameIndex;
+ private ArrayList relations = null;
/// <summary>
/// Initializes a new instance of the DataRelationCollection class.
{
defaultNameIndex = 1;
inTransition = false;
+ relations = new ArrayList();
}
/// <summary>
/// Adds a DataRelation to the DataRelationCollection.
/// </summary>
/// <param name="relation">The DataRelation to add to the collection.</param>
+ [MonoTODO]
public void Add(DataRelation relation)
{
if(relation != null)
/// <param name="parentColumn">parent column of relation.</param>
/// <param name="childColumn">child column of relation.</param>
/// <returns>The created DataRelation.</returns>
+ [MonoTODO]
public virtual DataRelation Add(DataColumn parentColumn, DataColumn childColumn)
{
throw new ArgumentNullException("childColumn");
}
+ // FIXME: temporarily commented so we can compile
+ /*
if(parentColumn.Table.DataSet != childColumn.Table.DataSet)
{
throw new InvalidConstraintException("my ex");
}
+ */
DataRelation dataRelation = new DataRelation("Relation" + defaultNameIndex.ToString(), parentColumn, childColumn);
//CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
/// <param name="parentColumns">An array of parent DataColumn objects.</param>
/// <param name="childColumns">An array of child DataColumn objects.</param>
/// <returns>The created DataRelation.</returns>
+ [MonoTODO]
public virtual DataRelation Add(DataColumn[] parentColumns, DataColumn[] childColumns)
{
DataRelation dataRelation = new DataRelation("Relation" + defaultNameIndex.ToString(), parentColumns, childColumns);
/// <param name="parentColumn">parent column of relation.</param>
/// <returns>The created DataRelation.</returns>
/// <returns></returns>
+ [MonoTODO]
public virtual DataRelation Add(string name, DataColumn parentColumn, DataColumn childColumn)
{
//If no name was supplied, give it a default name.
/// <param name="parentColumns">An array of parent DataColumn objects.</param>
/// <param name="childColumns">An array of child DataColumn objects.</param>
/// <returns>The created DataRelation.</returns>
+ [MonoTODO]
public virtual DataRelation Add(string name, DataColumn[] parentColumns, DataColumn[] childColumns)
{
//If no name was supplied, give it a default name.
/// <param name="childColumn">child column of relation.</param>
/// <param name="createConstraints">true to create constraints; otherwise false. (default is true)</param>
/// <returns>The created DataRelation.</returns>
+ [MonoTODO]
public virtual DataRelation Add(string name, DataColumn parentColumn, DataColumn childColumn, bool createConstraints)
{
//If no name was supplied, give it a default name.
/// <param name="childColumns">An array of child DataColumn objects.</param>
/// <param name="createConstraints">true to create a constraint; otherwise false.</param>
/// <returns>The created DataRelation.</returns>
+ [MonoTODO]
public virtual DataRelation Add(string name, DataColumn[] parentColumns, DataColumn[] childColumns, bool createConstraints)
{
//If no name was supplied, give it a default name.
/// Performs verification on the table.
/// </summary>
/// <param name="relation">The relation to check.</param>
+ [MonoTODO]
protected virtual void AddCore(DataRelation relation)
{
if (relation == null)
/// Copies the elements of the specified DataRelation array to the end of the collection.
/// </summary>
/// <param name="relations">The array of DataRelation objects to add to the collection.</param>
+ [MonoTODO]
public virtual void AddRange(DataRelation[] relations)
{
- //TODO: Implement.
+ //TODO: Implement
DataSet dataSet = GetDataSet();
+ throw new NotImplementedException ();
+
+ /*
foreach(DataRelation dataRelation in relations)
{
-
+
}
+ */
}
+ [MonoTODO]
public virtual bool CanRemove(DataRelation relation)
{
//TODO: Implement.
public virtual void Clear()
{
+ throw new NotImplementedException ();
}
+ [MonoTODO]
public virtual bool Contains(string name)
{
return false;
return relations.IndexOf(this[relationName]);
}
+ [MonoTODO]
protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent)
{
+ throw new NotImplementedException ();
}
+ [MonoTODO]
protected internal virtual void OnCollectionChanging(CollectionChangeEventArgs ccevent)
{
+ throw new NotImplementedException ();
}
+ [MonoTODO]
public void Remove(DataRelation relation)
{
+ throw new NotImplementedException ();
}
+ [MonoTODO]
public void Remove(string name)
{
+ throw new NotImplementedException ();
}
+ [MonoTODO]
public void RemoveAt(int index)
{
+ throw new NotImplementedException ();
}
+ [MonoTODO]
protected virtual void RemoveCore(DataRelation relation)
{
+ throw new NotImplementedException ();
}
public event CollectionChangeEventHandler CollectionChanged;
-
-
}
}
// Rodrigo Moya <rodrigo@ximian.com>
// Daniel Morgan <danmorg@sc.rr.com>
//
-// (C) Ximian, Inc
+// (C) Ximian, Inc 2002
+// (C) Daniel Morgan 2002
//
+using System;
+using System.Collections;
+
namespace System.Data
{
/// <summary>
private ArrayList columns = new ArrayList();
private ArrayList columnNames = new ArrayList();
+ private DataTable table = null;
#endregion
#region Properties
- [MonoTODO]
public bool HasErrors {
+ [MonoTODO]
get { throw new NotImplementedException (); }
}
- [MonoTODO]
public object this[string s] {
+ [MonoTODO]
get { throw new NotImplementedException (); }
+
+ [MonoTODO]
set { throw new NotImplementedException (); }
}
- [MonoTODO]
public object this[DataColumn dc] {
+ [MonoTODO]
get { throw new NotImplementedException (); }
+
+ [MonoTODO]
set { throw new NotImplementedException (); }
}
- [MonoTODO]
public object this[int i] {
+ [MonoTODO]
get { throw new NotImplementedException (); }
+
+ [MonoTODO]
set { throw new NotImplementedException (); }
}
- [MonoTODO]
public object this[string s, DataRowVersion version] {
+ [MonoTODO]
get { throw new NotImplementedException (); }
}
- [MonoTODO]
public object this[DataColumn dc, DataRowVersion version] {
+ [MonoTODO]
get { throw new NotImplementedException (); }
}
- [MonoTODO]
public object this[int i, DataRowVersion version] {
+ [MonoTODO]
get { throw new NotImplementedException (); }
}
- [MonoTODO]
public object[] ItemArray {
+ [MonoTODO]
get { throw new NotImplementedException (); }
+
+ [MonoTODO]
set { throw new NotImplementedException (); }
}
- [MonoTODO]
public string RowError {
+ [MonoTODO]
get { throw new NotImplementedException (); }
+
+ [MonoTODO]
set { throw new NotImplementedException (); }
}
- [MonoTODO]
public DataRowState RowState {
+ [MonoTODO]
get { throw new NotImplementedException (); }
}
- [MonoTODO]
public DataTable Table {
- get { throw new NotImplementedException (); }
+ [MonoTODO]
+ get {
+ return table;
+ }
}
#endregion // Public Properties
[MonoTODO]
public DataRowChangeEventArgs(DataRow row,\r
DataRowAction action) {
+
+ throw new NotImplementedException ();
}
public DataRowAction Action {
[MonoTODO]
get {
+ throw new NotImplementedException ();
}
}
public DataRow Row {
[MonoTODO]
get {
+ throw new NotImplementedException ();
}
}
// (C) Ximian, Inc 2002
//
+using System;
+using System.Collections;
+using System.ComponentModel;
+
namespace System.Data
{
/// <summary>\r
private ArrayList rows = null;
// Item indexer
- [Serializable]\r
public DataRow this[int index] {
[MonoTODO]
get {
+ return (DataRow) rows[index];
}
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public void Add(DataRow row) {
- row.Add(row);
+ rows.Add(row);
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public virtual DataRow Add(object[] values) {
+ throw new NotImplementedException ();
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public void Clear() {
+ throw new NotImplementedException ();
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public bool Contains(object key) {
+ throw new NotImplementedException ();
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public DataRow Find(object key) {
+ throw new NotImplementedException ();
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public DataRow Find(object[] keys) {
+ throw new NotImplementedException ();
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public void InsertAt(DataRow row, int pos) {
+ throw new NotImplementedException ();
}
- [MonoTODO]
- [Serializable]\r
+ [MonoTODO]\r
public void Remove(DataRow row) {
+ throw new NotImplementedException ();
}
-
- [Serializable]\r
+\r
+ [MonoTODO]\r
public void RemoveAt(int index) {\r
+ throw new NotImplementedException ();\r
}\r
\r
- [Serializable]\r
+ [MonoTODO]\r
protected override ArrayList List {\r
[MonoTODO]\r
get {\r
+ return rows;\r
}\r
- }\r
-
+ }
}
}
private bool _caseSensitive;
private DataColumnCollection _columnCollection;
private ConstraintCollection _constraintCollection;
- // private DataSet _dataSet; // FIXME: temporarily commented
- // private DataView _defaultView; // FIXME: temporarily commented
+ // FIXME: temporarily commented
+ // private DataSet _dataSet;
+ // private DataView _defaultView;
private string _displayExpression;
private PropertyCollection _extendedProperties;
private bool _hasErrors;
private CultureInfo _locale;
private int _minimumCapacity;
private string _nameSpace;
- private DataTableRelationCollection _childRelations;
- private DataTableRelationCollection _parentRelations;
+ // FIXME: temporarily commented
+ // private DataTableRelationCollection _childRelations;
+ // private DataTableRelationCollection _parentRelations;
private string _prefix;
private DataColumn[] _primaryKey;
private DataRowCollection _rows;
_displayExpression = null;
_primaryKey = null;
- _childRelations = new DataTableRelationCollection();
- _parentRelations = new DataTableRelationCollection();
+ // FIXME: temporaily commented DataTableRelationCollection
+ // _childRelations = new DataTableRelationCollection();
+ // _parentRelations = new DataTableRelationCollection();
+
//_nextRowID = 1;
//_elementColumnCount = 0;
//_caseSensitiveAmbient = true;
public DataTable(string tableName)
{
- // _dataSet = null; // FIXME: temporarily commented
+ // _dataSet = null; // FIXME: temporarily commented
// _defaultView = null; // FIXME: temporarily commented
_columnCollection = new DataColumnCollection(this);
//_constraintCollection = new ConstraintCollection(); TODO: uncomment after ConstraintCollection is built.
_caseSensitive = false;
_displayExpression = null;
_primaryKey = null;
- _childRelations = new DataTableRelationCollection();
- _parentRelations = new DataTableRelationCollection();
+
+ // FIXME: temporarily commented DataTableRelationCollection
+ // _childRelations = new DataTableRelationCollection();
+ // _parentRelations = new DataTableRelationCollection();
+
//_nextRowID = 1;
//_elementColumnCount = 0;
//_caseSensitiveAmbient = true;
{
get
{
- return (DataRelationCollection)_childRelations;
+ // FIXME: temporarily commented to compile
+ // return (DataRelationCollection)_childRelations;
+ throw new NotImplementedException ();
}
}
}
/// <summary>
- /// Gets a customized view of the table which may include a filtered view, or a cursor position.
+ /// Gets a customized view of the table which may
+ /// include a filtered view, or a cursor position.
/// </summary>
public DataView DefaultView
*/
/// <summary>
- /// Gets or sets the expression that will return a value used to represent this table in the user interface.
+ /// Gets or sets the expression that will return
+ /// a value used to represent this table in the user interface.
/// </summary>
public string DisplayExpression
}
/// <summary>
- /// Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.
+ /// Gets a value indicating whether there are errors in
+ /// any of the rows in any of the tables of the DataSet to
+ /// which the table belongs.
/// </summary>
public bool HasErrors
{
}
/// <summary>
- /// Gets or sets the locale information used to compare strings within the table.
+ /// Gets or sets the locale information used to
+ /// compare strings within the table.
/// </summary>
public CultureInfo Locale
{
}
/// <summary>
- /// Gets or sets the namespace for the XML represenation of the data stored in the DataTable.
+ /// Gets or sets the namespace for the XML represenation
+ /// of the data stored in the DataTable.
/// </summary>
public string Namespace
{
}
/// <summary>
- /// Gets the collection of parent relations for this DataTable.
+ /// Gets the collection of parent relations for
+ /// this DataTable.
/// </summary>
public DataRelationCollection ParentRelations
{
get
- {
- return _parentRelations;
+ {
+ // FIXME: temporarily commented to compile
+ // return _parentRelations;
+ throw new NotImplementedException ();
}
}
/// <summary>
- /// Gets or sets the namespace for the XML represenation of the data stored in the DataTable.
+ /// Gets or sets the namespace for the XML represenation
+ /// of the data stored in the DataTable.
/// </summary>
public string Prefix
{
}
/// <summary>
- /// Gets or sets an array of columns that function as primary keys for the data table.
+ /// Gets or sets an array of columns that function as
+ /// primary keys for the data table.
/// </summary>
public DataColumn[] PrimaryKey
{
}
/// <summary>
- /// Gets or sets an System.ComponentModel.ISite for the DataTable.
+ /// Gets or sets an System.ComponentModel.ISite
+ /// for the DataTable.
/// </summary>
- public override ISite Site
+ public virtual ISite Site
{
get
{
}
}
- bool IListSource.ContainsListCollection
+ /* FIXME: implement IListSource
+ public bool IListSource.ContainsListCollection
{
get
{
return _containsListCollection;
}
}
-
+ */
/// <summary>
- /// Commits all the changes made to this table since the last time AcceptChanges was called.
+ /// Commits all the changes made to this table since the
+ /// last time AcceptChanges was called.
/// </summary>
public void AcceptChanges()
}
/// <summary>
- /// Begins the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at runtime.
+ /// Begins the initialization of a DataTable that is used
+ /// on a form or used by another component. The initialization
+ /// occurs at runtime.
/// </summary>
public void BeginInit()
}
/// <summary>
- /// Turns off notifications, index maintenance, and constraints while loading data.
+ /// Turns off notifications, index maintenance, and
+ /// constraints while loading data.
/// </summary>
public void BeginLoadData()
}
/// <summary>
- /// Clones the structure of the DataTable, including all DataTable schemas and constraints.
+ /// Clones the structure of the DataTable, including
+ /// all DataTable schemas and constraints.
/// </summary>
public virtual DataTable Clone()
}
/// <summary>
- /// Computes the given expression on the current rows that pass the filter criteria.
+ /// Computes the given expression on the current rows that
+ /// pass the filter criteria.
/// </summary>
public object Compute(string expression, string filter)
}
/// <summary>
- /// Ends the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at runtime.
+ /// Ends the initialization of a DataTable that is used
+ /// on a form or used by another component. The
+ /// initialization occurs at runtime.
/// </summary>
public void EndInit()
}
/// <summary>
- /// Turns on notifications, index maintenance, and constraints after loading data.
+ /// Turns on notifications, index maintenance, and
+ /// constraints after loading data.
/// </summary>
public void EndLoadData()
}
/// <summary>
- /// Gets a copy of the DataTable that contains all changes made to it since it was loaded or AcceptChanges was last called.
+ /// Gets a copy of the DataTable that contains all
+ /// changes made to it since it was loaded or
+ /// AcceptChanges was last called.
/// </summary>
public DataTable GetChanges()
}
/// <summary>
- /// Gets a copy of the DataTable containing all changes made to it since it was last loaded, or since AcceptChanges was called, filtered by DataRowState.
+ /// Gets a copy of the DataTable containing all
+ /// changes made to it since it was last loaded, or
+ /// since AcceptChanges was called, filtered by DataRowState.
/// </summary>
public DataTable GetChanges(DataRowState rowStates)
//}
/// <summary>
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
+ /// This member supports the .NET Framework infrastructure
+ /// and is not intended to be used directly from your code.
/// </summary>
//protected virtual Type GetRowType()
//}
/// <summary>
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
+ /// This member supports the .NET Framework infrastructure
+ /// and is not intended to be used directly from your code.
/// </summary>
- IList IListSource.GetList()
+ /* FIXME: implement IListSource
+ public IList IListSource.GetList()
{
IList list = null;
return list;
}
-
+ */
+
/// <summary>
- /// Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.
+ /// Copies a DataRow into a DataTable, preserving any
+ /// property settings, as well as original and current values.
/// </summary>
public void ImportRow(DataRow row)
}
/// <summary>
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
+ /// This member supports the .NET Framework infrastructure
+ /// and is not intended to be used directly from your code.
/// </summary>
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
}
/// <summary>
- /// Finds and updates a specific row. If no matching row is found, a new row is created using the given values.
+ /// Finds and updates a specific row. If no matching row
+ /// is found, a new row is created using the given values.
/// </summary>
public DataRow LoadDataRow(object[] values, bool fAcceptChanges)
{
}
/// <summary>
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
+ /// This member supports the .NET Framework infrastructure
+ /// and is not intended to be used directly from your code.
/// </summary>
protected internal DataRow[] NewRowArray(int size)
{
}
/// <summary>
- /// Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called.
+ /// Rolls back all changes that have been made to the
+ /// table since it was loaded, or the last time AcceptChanges
+ /// was called.
/// </summary>
public void RejectChanges()
}
/// <summary>
- /// Gets an array of all DataRow objects that match the filter criteria in order of primary key (or lacking one, order of addition.)
+ /// Gets an array of all DataRow objects that match
+ /// the filter criteria in order of primary key (or
+ /// lacking one, order of addition.)
/// </summary>
public DataRow[] Select(string filterExpression)
}
/// <summary>
- /// Gets an array of all DataRow objects that match the filter criteria, in the the specified sort order.
+ /// Gets an array of all DataRow objects that
+ /// match the filter criteria, in the the
+ /// specified sort order.
/// </summary>
public DataRow[] Select(string filterExpression, string sort)
}
/// <summary>
- /// Gets an array of all DataRow objects that match the filter in the order of the sort, that match the specified state.
+ /// Gets an array of all DataRow objects that match
+ /// the filter in the order of the sort, that match
+ /// the specified state.
/// </summary>
public DataRow[] Select(string filterExpression, string sort, DataViewRowState recordStates)
}
/// <summary>
- /// Gets the TableName and DisplayExpression, if there is one as a concatenated string.
+ /// Gets the TableName and DisplayExpression, if
+ /// there is one as a concatenated string.
/// </summary>
public override string ToString()
/* FIXME: temporarily commented - so we can get a
* a simple forward read only result set
/// <summary>
- /// Occurs when after a value has been changed for the specified DataColumn in a DataRow.
+ /// Occurs when after a value has been changed for
+ /// the specified DataColumn in a DataRow.
/// </summary>
public event DataColumnChangeEventHandler ColumnChanged;
/// <summary>
- /// Occurs when a value is being changed for the specified DataColumn in a DataRow.
+ /// Occurs when a value is being changed for the specified
+ /// DataColumn in a DataRow.
/// </summary>
public event DataColumnChangeEventHandler ColumnChanging;
//
using System;
+using System.Collections;
+using System.ComponentModel;
namespace System.Data
{
}
[MonoTODO]
- [Serializable]
public bool CanRemove (DataTable table) {
throw new NotImplementedException ();
}
return false;
}
- public void CopyTo (Array ar, int index) {
- Array.Copy (tables, ar, size);
- }
-
public virtual int IndexOf (DataTable table) {
for (int i = 0; i < size; i++) {
if (tables[i] == table)
return null;
}
}
-
- [MonoTODO]
+\r
protected override ArrayList List {
- throw new NotImplementedException ();
+ [MonoTODO]
+ get{
+ throw new NotImplementedException ();
+ }
}
- [Serializable]
public event CollectionChangeEventHandler CollectionChanged;
- [Serializable]
public event CollectionChangeEventHandler CollectionChanging;
- [Serializable]
protected virtual void OnCollectionChanged (
CollectionChangeEventArgs ccevent) {
+
+ throw new NotImplementedException ();
}
- [Serializable]
protected internal virtual void OnCollectionChanging (
CollectionChangeEventArgs ccevent) {
+
+ throw new NotImplementedException ();
}
}
}
--- /dev/null
+//
+// System.Data.DataTableRelationCollection.cs
+//
+// Author:
+// Christopher Podurgiel (cpodurgiel@msn.com)
+//
+// (C) Chris Podurgiel
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+
+namespace System.Data
+{
+ /// <summary>
+ /// Summary description for DataTableRelationCollection.
+ /// </summary>
+ internal class DataTableRelationCollection : DataRelationCollection
+ {
+ private ArrayList list = null;
+ private int defaultNameIndex;
+ private DataTable table;
+
+
+ /// <summary>
+ /// Initializes a new instance of the DataRelationCollection class.
+ /// </summary>
+ [MonoTODO]
+ internal DataTableRelationCollection():base()
+ {
+ //table = dataTable;
+ }
+
+ /// <summary>
+ /// Gets the DataRelation object specified by name.
+ /// </summary>
+ [MonoTODO]
+ public override DataRelation this[string name]
+ {
+ get
+ {
+ foreach (DataRelation dataRelation in list)
+ {
+ if (dataRelation.RelationName == name)
+ {
+ return dataRelation;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /// <summary>
+ /// Gets the DataRelation object at the specified index.
+ /// </summary>
+ [MonoTODO]
+ public override DataRelation this[int index]
+ {
+ get
+ {
+ return (DataRelation)list[index];
+ }
+ }
+
+ /*
+ #region Add Methods
+ /// <summary>
+ /// Adds a DataRelation to the DataRelationCollection.
+ /// </summary>
+ /// <param name="relation">The DataRelation to add to the collection.</param>
+ public new void Add(DataRelation relation)
+ {
+ if(relation != null)
+ {
+ //CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
+ list.Add(relation);
+ //OnCollectionChanged(e);
+ }
+ return;
+ }
+
+ /// <summary>
+ /// Creates a relation given the parameters and adds it to the collection. The name is defaulted.
+ /// An ArgumentException is generated if this relation already belongs to this collection or belongs to another collection.
+ /// An InvalidConstraintException is generated if the relation can't be created based on the parameters.
+ /// The CollectionChanged event is fired if it succeeds.
+ /// </summary>
+ /// <param name="parentColumn">parent column of relation.</param>
+ /// <param name="childColumn">child column of relation.</param>
+ /// <returns>The created DataRelation.</returns>
+ public override DataRelation Add(DataColumn parentColumn, DataColumn childColumn)
+ {
+ if(parentColumn == null)
+ {
+ throw new ArgumentNullException("parentColumn");
+ }
+ else if( childColumn == null)
+ {
+ throw new ArgumentNullException("childColumn");
+ }
+
+ if(parentColumn.Table.DataSet != childColumn.Table.DataSet)
+ {
+ throw new InvalidConstraintException("my ex");
+ }
+
+ DataRelation dataRelation = new DataRelation("Relation" + defaultNameIndex.ToString(), parentColumn, childColumn);
+ list.Add(dataRelation);
+ defaultNameIndex++;
+ return dataRelation;
+ }
+
+ /// <summary>
+ /// Creates a relation given the parameters and adds it to the collection. The name is defaulted.
+ /// An ArgumentException is generated if this relation already belongs to this collection or belongs to another collection.
+ /// An InvalidConstraintException is generated if the relation can't be created based on the parameters.
+ /// The CollectionChanged event is raised if it succeeds.
+ /// </summary>
+ /// <param name="parentColumns">An array of parent DataColumn objects.</param>
+ /// <param name="childColumns">An array of child DataColumn objects.</param>
+ /// <returns>The created DataRelation.</returns>
+ public override DataRelation Add(DataColumn[] parentColumns, DataColumn[] childColumns)
+ {
+ DataRelation dataRelation = new DataRelation("Relation" + defaultNameIndex.ToString(), parentColumns, childColumns);
+ list.Add(dataRelation);
+ defaultNameIndex++;
+ return dataRelation;
+ }
+
+ /// <summary>
+ /// Creates a relation given the parameters and adds it to the collection.
+ /// An ArgumentException is generated if this relation already belongs to this collection or belongs to another collection.
+ /// A DuplicateNameException is generated if this collection already has a relation with the same name (case insensitive).
+ /// An InvalidConstraintException is generated if the relation can't be created based on the parameters.
+ /// The CollectionChanged event is raised if it succeeds.
+ /// </summary>
+ /// <param name="name">The name of the relation.</param>
+ /// <param name="parentColumn">parent column of relation.</param>
+ /// <returns>The created DataRelation.</returns>
+ /// <returns></returns>
+ public override DataRelation Add(string name, DataColumn parentColumn, DataColumn childColumn)
+ {
+ //If no name was supplied, give it a default name.
+ if ((name == null) || (name == ""))
+ {
+ name = "Relation" + defaultNameIndex.ToString();
+ defaultNameIndex++;
+ }
+
+ DataRelation dataRelation = new DataRelation(name, parentColumn, childColumn);
+ list.Add(dataRelation);
+ return dataRelation;
+ }
+
+ /// <summary>
+ /// Creates a DataRelation with the specified name, and arrays of parent and child columns, and adds it to the collection.
+ /// </summary>
+ /// <param name="name">The name of the DataRelation to create.</param>
+ /// <param name="parentColumns">An array of parent DataColumn objects.</param>
+ /// <param name="childColumns">An array of child DataColumn objects.</param>
+ /// <returns>The created DataRelation.</returns>
+ public override DataRelation Add(string name, DataColumn[] parentColumns, DataColumn[] childColumns)
+ {
+ //If no name was supplied, give it a default name.
+ if ((name == null) || (name == ""))
+ {
+ name = "Relation" + defaultNameIndex.ToString();
+ defaultNameIndex++;
+ }
+
+ DataRelation dataRelation = new DataRelation(name, parentColumns, childColumns);
+ list.Add(dataRelation);
+ return dataRelation;
+ }
+
+ /// <summary>
+ /// Creates a relation given the parameters and adds it to the collection.
+ /// An ArgumentException is generated if this relation already belongs to this collection or belongs to another collection.
+ /// A DuplicateNameException is generated if this collection already has a relation with the same name (case insensitive).
+ /// An InvalidConstraintException is generated if the relation can't be created based on the parameters.
+ /// The CollectionChanged event is raised if it succeeds.
+ /// </summary>
+ /// <param name="name">The name of the relation.</param>
+ /// <param name="parentColumn">parent column of relation.</param>
+ /// <param name="childColumn">child column of relation.</param>
+ /// <param name="createConstraints">true to create constraints; otherwise false. (default is true)</param>
+ /// <returns>The created DataRelation.</returns>
+ public override DataRelation Add(string name, DataColumn parentColumn, DataColumn childColumn, bool createConstraints)
+ {
+ //If no name was supplied, give it a default name.
+ if ((name == null) || (name == ""))
+ {
+ name = "Relation" + defaultNameIndex.ToString();
+ defaultNameIndex++;
+ }
+
+ DataRelation dataRelation = new DataRelation(name, parentColumn, childColumn, createConstraints);
+ list.Add(dataRelation);
+ return dataRelation;
+ }
+
+ /// <summary>
+ /// Creates a DataRelation with the specified name, arrays of parent and child columns,
+ /// and value specifying whether to create a constraint, and adds it to the collection.
+ /// </summary>
+ /// <param name="name">The name of the DataRelation to create.</param>
+ /// <param name="parentColumns">An array of parent DataColumn objects.</param>
+ /// <param name="childColumns">An array of child DataColumn objects.</param>
+ /// <param name="createConstraints">true to create a constraint; otherwise false.</param>
+ /// <returns>The created DataRelation.</returns>
+ public override DataRelation Add(string name, DataColumn[] parentColumns, DataColumn[] childColumns, bool createConstraints)
+ {
+ //If no name was supplied, give it a default name.
+ if ((name == null) || (name == ""))
+ {
+ name = "Relation" + defaultNameIndex.ToString();
+ defaultNameIndex++;
+ }
+
+ DataRelation dataRelation = new DataRelation(name, parentColumns, childColumns, createConstraints);
+ list.Add(dataRelation);
+ return dataRelation;
+ }
+ #endregion
+
+ /// <summary>
+ /// Performs verification on the table.
+ /// </summary>
+ /// <param name="relation">The relation to check.</param>
+ protected virtual void AddCore(DataRelation relation)
+ {
+ if (relation == null)
+ {
+ //TODO: Issue a good exception message.
+ throw new ArgumentNullException();
+ }
+ else if(list.IndexOf(relation) != -1)
+ {
+ //TODO: Issue a good exception message.
+ throw new ArgumentException();
+ }
+ else if(list.Contains(relation.RelationName))
+ {
+ throw new DuplicateNameException("A Relation named " + relation.RelationName + " already belongs to this DataSet.");
+ }
+ }
+ */
+
+ /// <summary>
+ /// Copies the elements of the specified DataRelation array to the end of the collection.
+ /// </summary>
+ /// <param name="relations">The array of DataRelation objects to add to the collection.</param>
+ [MonoTODO]
+ public virtual void AddRange(DataRelation[] relations)
+ {
+ //TODO: Implement.
+
+ DataSet dataSet = GetDataSet();
+
+ throw new NotImplementedException ();
+
+ /*
+ foreach(DataRelation dataRelation in relations)
+ {
+
+ }
+ */
+ }
+
+ [MonoTODO]
+ public virtual bool CanRemove(DataRelation relation)
+ {
+ //TODO: Implement.
+ return false;
+ }
+
+ [MonoTODO]
+ public virtual void Clear()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual bool Contains(string name)
+ {
+ return false;
+ }
+
+ // FIXME: temporarily commented so we can compile
+ /*
+ [MonoTODO]
+ protected override DataSet GetDataSet()
+ {
+ return table.DataSet;
+ }
+ */
+
+ [MonoTODO]
+ public virtual int IndexOf(DataRelation relation)
+ {
+ return list.IndexOf(relation);
+ }
+
+ [MonoTODO]
+ public virtual int IndexOf(string relationName)
+ {
+ return list.IndexOf(this[relationName]);
+ }
+
+ [MonoTODO]
+ protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected internal virtual void OnCollectionChanging(CollectionChangeEventArgs ccevent)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Remove(DataRelation relation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Remove(string name)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void RemoveAt(int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected virtual void RemoveCore(DataRelation relation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public event CollectionChangeEventHandler CollectionChanged;
+
+ }
+}
--- /dev/null
+//
+// System.Data.ForeignKeyConstraint.cs
+//
+// Author:
+// Daniel Morgan <danmorg@sc.rr.com>
+//
+// (C) 2002 Daniel Morgan
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace System.Data
+{
+
+ [Serializable]\r
+ public class ForeignKeyConstraint : Constraint {
+
+ #region Constructors
+
+ [MonoTODO]\r
+ public ForeignKeyConstraint(DataColumn parentColumn, \r
+ DataColumn childColumn) {
+ }
+
+ [MonoTODO]\r
+ public ForeignKeyConstraint(DataColumn[] parentColumns,\r
+ DataColumn[] childColumns) {
+ }
+
+ [MonoTODO]\r
+ public ForeignKeyConstraint(string constraintName,\r
+ DataColumn parentColumn, DataColumn childColumn) {
+ }
+
+ [MonoTODO]\r
+ public ForeignKeyConstraint(string constraintName,\r
+ DataColumn[] parentColumns, \r
+ DataColumn[] childColumns) {
+ }
+
+ [MonoTODO]\r
+ public ForeignKeyConstraint(string constraintName,\r
+ string parentTableName, string[] parentColumnNames,\r
+ string[] childColumnNames, \r
+ AcceptRejectRule acceptRejectRule, Rule deleteRule,\r
+ Rule updateRule) {
+ }
+
+ #endregion // Constructors
+
+ #region Properites
+\r
+ public virtual AcceptRejectRule AcceptRejectRule {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+\r
+ public virtual DataColumn[] Columns {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+\r
+ public virtual Rule DeleteRule {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+\r
+ public virtual DataColumn[] RelatedColumns {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }\r
+\r
+ public virtual DataTable RelatedTable {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+\r
+ public override DataTable Table {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+\r
+ public virtual Rule UpdateRule {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ [MonoTODO]\r
+ public override bool Equals(object key) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]\r
+ public override int GetHashCode() {
+ throw new NotImplementedException ();
+ }
+
+ #endregion // Methods
+ }
+
+}
int ExecuteNonQuery();
- // FIXME: temporarily commented so i could
- // compile SqlConnection and SqlCommand
- /*
IDataReader ExecuteReader();
IDataReader ExecuteReader(CommandBehavior behavior);
- */
+
object ExecuteScalar();
void Prepare();
-
string CommandText{get; set;}
int CommandTimeout{get; set;}
[MonoTODO]
get {
// FIXME: how do we sync?
+ throw new NotImplementedException ();
}
}
[MonoTODO]
public IEnumerator GetEnumerator() {
-
+ throw new NotImplementedException ();
}
//[MonoTODO]
using System;
using System.Collections;
+using System.ComponentModel;
namespace System.Data
{
--- /dev/null
+//
+// System.Data.UniqueConstraint.cs
+//
+// Author:
+// Daniel Morgan <danmorg@sc.rr.com>
+//
+// (C) 2002 Daniel Morgan
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace System.Data
+{
+ public class UniqueConstraint : Constraint {
+
+ #region Constructors
+
+ [MonoTODO]\r
+ public UniqueConstraint(DataColumn column) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(DataColumn[] columns) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(DataColumn column,\r
+ bool isPrimaryKey) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(DataColumn[] columns, bool isPrimaryKey) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(string name, DataColumn column) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(string name, DataColumn[] columns) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(string name, DataColumn column,\r
+ bool isPrimaryKey) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(string name,\r
+ DataColumn[] columns, bool isPrimaryKey) {
+
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public UniqueConstraint(string name,\r
+ string[] columnNames, bool isPrimaryKey) {
+
+ throw new NotImplementedException ();
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public virtual DataColumn[] Columns {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsPrimaryKey {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override DataTable Table {
+ [MonoTODO]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ [MonoTODO]
+ public override bool Equals(object key2) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override int GetHashCode() {
+ throw new NotImplementedException ();
+ }
+
+ #endregion // Methods
+ }
+}
System.Data TODO List
=====================
-This TODO list last updated on 2002-04-23
-
Update this file as needed...
* To get ExecuteReader() in a SqlCommand object to return
a SqlDataReader object which can Read() data and get a String or
Int32 from the database. Other types can be done later.
-
-In order to do this, we need to compile
- SqlDataReader
- DataTable
+
+ A class (SqlDataReader) that implements IDataReader/IDataRecord
+ only has one row in memory at a time.
+
+In order to do this, we need to compile and edit these classes:
+ SqlDataReader DataTable DataRowCollection DataRow
+ DataColumnCollection DataColumn
+ DataConstraintCollection DataConstraint
+ DataRelationCollection DataRelation
+ DataTableCollection
and dependencies...
System.Data.Common classes that need to be implemented:
* DataRowCollection
* DataColumnCollection
* DataTableCollection
- * DataRelationCollection
+ * DataRelationCollection - an abstract class used by DataTable and DataSet
* ConstraintCollection
+DataTableRelationCollection is an internal class that implements DataRelationCollection
+and is used by DataTable for parent/child relations. Don't know if it will/will not
+be used by DataSet.
+
Other classes, structs, etc. that are missing:
DataRowView
DataSysDescriptionAttribute
DataViewSetting
DataViewSettingCollection
FillErrorEventArgs
- ForeignKeyConstraint
MergeFailedEventArgs
- UniqueConstraint
TypedDataSetGenerator
Exceptions that still need to be stubbed: