Browse Source

2002-04-23 Daniel Morgan <[email protected]>

	* System.Data.build: modified - added new
	files to exclude from build

	* System.Data/Constraint.cs
	* System.Data/ConstraintCollection.cs
	* System.Data/InternalDataCollectionBase.cs: added -
	stubs which are needed to build DataTable.cs

	* TODO: modified - added more classes TODO and
	added more stuff TODO, such as, create script
	to create test database monotestdb for testing
	classes in System.Data

svn path=/trunk/mcs/; revision=4010
Daniel Morgan 24 years ago
parent
commit
457dd7cee7

+ 15 - 0
mcs/class/System.Data/ChangeLog

@@ -1,3 +1,18 @@
+2002-04-23  Daniel Morgan <[email protected]>
+
+	* System.Data.build: modified - added new
+	files to exclude from build 
+	
+	* System.Data/Constraint.cs
+	* System.Data/ConstraintCollection.cs
+	* System.Data/InternalDataCollectionBase.cs: added -
+	stubs which are needed to build DataTable.cs
+	
+	* TODO: modified - added more classes TODO and
+	added more stuff TODO, such as, create script
+	to create test database monotestdb for testing
+	classes in System.Data
+
 2002-04-23  Rodrigo Moya <[email protected]>
 
 	* System.Data.Common/DataAdapter.cs:

+ 3 - 0
mcs/class/System.Data/System.Data.build

@@ -11,6 +11,9 @@
 			<arg value="/unsafe"/>
 			<sources>
 				<includes name="**/*.cs"/> 
+				<excludes name="System.Data/Constraint.cs"/>
+				<excludes name="System.Data/ConstraintCollection.cs"/>
+				<excludes name="System.Data/InternalDataCollectionBase.cs"/>
 				<excludes name="System.Data/DataColumn.cs"/>
 				<excludes name="System.Data/DataRow.cs"/>
 				<excludes name="System.Data/DataTableRelationCollection.cs"/>

+ 59 - 0
mcs/class/System.Data/System.Data/Constraint.cs

@@ -0,0 +1,59 @@
+//
+// System.Data.Constraint.cs
+//
+// Author:
+//   Daniel Morgan
+//
+// (C) Ximian, Inc. 2002
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace System.Data
+{
+	[Serializable]
+	public abstract class Constraint {
+
+		[MonoTODO]
+		[Serializable]
+		protected Constraint() {
+		}
+
+		[Serializable]
+		public virtual string ConstraintName {
+			[MonoTODO]
+			get{
+			} 
+
+			[MonoTODO]
+			set{
+			}
+		}
+
+		[Serializable]
+		public PropertyCollection ExtendedProperties {
+			[MonoTODO]
+			get {
+			}
+		}
+
+		[Serializable]
+		public abstract DataTable Table {
+			get;
+		}
+
+		[MonoTODO]
+		[Serializable]
+		public override string ToString() {
+		}
+
+		[MonoTODO]
+		[Serializable]
+		[ClassInterface(ClassInterfaceType.AutoDual)]
+		~Constraint() {
+		}
+	}
+}

+ 137 - 0
mcs/class/System.Data/System.Data/ConstraintCollection.cs

@@ -0,0 +1,137 @@
+//
+// System.Data.ConstraintCollection.cs
+//
+// Author:
+//   Daniel Morgan
+//
+// (C) Ximian, Inc. 2002
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+
+namespace System.Data
+{
+	/// <summary>
+	/// hold collection of constraints for data table
+	/// </summary>
+	public class ConstraintCollection : InternalDataCollectionBase {
+
+		[MonoTODO]
+		[Serializable]
+		public virtual Constraint this[string name] {
+			[MonoTODO]
+			get {
+			}
+		}
+
+		[MonoTODO]
+		[Serializable]
+		public virtual Constraint this[int index] {
+			[MonoTODO]
+			get {
+			}
+		}
+
+		// Overloaded Add method (5 of them)
+		// to add Constraint object to the collection
+
+		[Serializable]
+		[MonoTODO]
+		public void Add(Constraint constraint) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public virtual Constraint Add(string name,
+			DataColumn column, bool primaryKey) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public virtual Constraint Add(string name,
+			DataColumn primaryKeyColumn,
+			DataColumn foreignKeyColumn) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public virtual Constraint Add(string name,
+			DataColumn[] columns, bool primaryKey) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public virtual Constraint Add(string name,
+			DataColumn[] primaryKeyColumns,
+			DataColumn[] foreignKeyColumns) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public void AddRange(Constraint[] constraints) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public bool CanRemove(Constraint constraint) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public void Clear() {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public bool Contains(string name) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public int IndexOf(Constraint constraint) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public virtual int IndexOf(string constraintName) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public void Remove(Constraint constraint) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public void Remove(string name) {
+		}
+
+		[Serializable]
+		[MonoTODO]
+		public void RemoveAt(int index) {
+		}
+
+		/*
+		 * FIXME: fix this event
+		[Serializable]
+		[MonoTODO]
+		public event CollectionChangeEventHandler CollectionChanged;
+		*/
+
+		[Serializable]
+		protected override ArrayList List {
+			[MonoTODO]
+			get{
+			}
+		}
+
+		[Serializable]
+		[MonoTODO]
+		protected virtual void OnCollectionChanged(
+			CollectionChangeEventArgs ccevent) {
+		}
+
+	}
+}

+ 86 - 0
mcs/class/System.Data/System.Data/InternalDataCollectionBase.cs

@@ -0,0 +1,86 @@
+//
+// System.Data.InternalDataCollectionBase.cs
+//
+// Base class for:
+//     DataRowCollection
+//     DataColumnCollection
+//     DataTableCollection
+//     DataRelationCollection
+//     DataConstraintCollection
+//
+// Author:
+//   Daniel Morgan
+//
+// (C) Ximian, Inc. 2002
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+
+namespace System.Data
+{
+	/// <summary>
+	/// Base class for System.Data collection classes 
+	/// that are used within a DataTable object
+	/// to represent a collection of 
+	/// relations, tables, rows, columns, and constraints
+	/// </summary>
+	public class InternalDataCollectionBase : ICollection, IEnumerable {
+
+		// Constructor
+		[MonoTODO]
+		public InternalDataCollectionBase() {
+			// FIXME: TODO
+		}
+		
+		public virtual int Count {
+			[MonoTODO]
+			get {
+			}
+		}
+
+		public bool IsReadOnly {
+			[MonoTODO]
+			get {
+			}
+		}
+
+		public bool IsSynchronized {
+			[MonoTODO]
+			get {
+				
+			}
+		}
+
+		public object SyncRoot {
+			[MonoTODO]
+			get {
+				
+			}
+		}
+
+		protected virtual ArrayList List {
+			[MonoTODO]
+			get {
+			}
+		}
+
+		[MonoTODO]
+		public void CopyTo(Array ar, int index) {
+
+		}
+
+		[MonoTODO]
+		public IEnumerator GetEnumerator() {
+
+		}
+
+		[MonoTODO]
+		~InternalDataCollectionBase() {
+
+		}
+
+	}
+
+}

+ 35 - 5
mcs/class/System.Data/TODO

@@ -49,25 +49,41 @@ The following classes implement InternalDataCollectionBase:
 	* DataColumnCollection
 	* DataTableCollection
 	* DataRelationCollection
-	* DataConstraintCollection
+	* ConstraintCollection
 
 Other classes, structs, etc. that are missing:
+	Constraint
+	DataRowChangeEventArgs
+	DataSysDescriptionAttribute
 	DataView
 	DataViewManager
 	DataViewSetting
 	DataViewSettingCollection
+	FillErrorEventArgs
 	ForeignKeyConstraint
+	MergeFailedEventArgs
 	PropertyCollection
 	UniqueConstraint
 	TypedDataSetGenerator
 
-Exceptions that still need to be done:
+Exceptions that still need to be stubbed:
 	(need to see what exceptions need to be done)
-	SyntaxErrorException
+	ConstraintException
+	DataException
+	DBConcurrencyException
+	InvalidConstraintException
+	InvalidExpressionException
+	MissingPrimaryKeyException
+	NonNullAllowedException
+	ReadOnlyException
+	RowNotInTableException
 	SqlNullValueException
 	SqlTruncateException
 	SqlTypeException
+	StrongTypingException
+	SyntaxErrorException
 	TypedDataSetGeneratorException
+	VersionNotFoundException
  
 The additional System.Data.SqlTypes classes need to be stubbed:
 	SqlByte
@@ -80,9 +96,21 @@ The additional System.Data.SqlTypes classes need to be stubbed:
 	SqlMoney
 	SqlSingle
 
+* provide a standard scheme for storing
+  connection string data
+
 * allow Execute methods in SqlCommand to
   call a stored procedure
 
+* Create a script for testing System.Data:
+  - calls script to create 
+    a test database named monotestdb
+  - set up nunit for testing System.Data
+  - set up System.Data.Config or some other 
+    file to hold connection strings and other
+    configuration settings for the testing System.Data
+  - any other stuff needed...
+
 * get SqlParameter/SqlParameterCollection
   working so you can:
   - for queries/commands that have parameters:
@@ -98,8 +126,8 @@ The additional System.Data.SqlTypes classes need to be stubbed:
 
 * get SqlDataAdapter/DataSet working
 
-* provide a standard scheme for stroring
-  connection string data
+* Create Library for PInvoking into libgda
+  This will be used by System.Data.OleDb classes
 
 * Begin System.Data.OleDb classes:
   - OleDbConnection
@@ -115,6 +143,8 @@ The additional System.Data.SqlTypes classes need to be stubbed:
 * Do more OleDb classes for DataSet:
   - OleDbDataAdapter
   - others...
+  
+* Security Audit of System.Data
 
 * Create a MySQL ADO.NET Provider