2004-11-24 Sureshkumar T <tsureshkumar@novell.com>
authorSureshkumar T <suresh@mono-cvs.ximian.com>
Wed, 24 Nov 2004 09:38:48 +0000 (09:38 -0000)
committerSureshkumar T <suresh@mono-cvs.ximian.com>
Wed, 24 Nov 2004 09:38:48 +0000 (09:38 -0000)
Changes in Base class implementaitons for Provider Factory
Implementation.
In System.Data.Common:
* DbProviderSupportedClasses.cs: Added correct enum values.
* DbConnection.cs: Missing virtual method EnlistTransaction Added.
* DbCommand.cs: Implemented ProviderFactory base factory methods.

In System.Data.ProviderBase:
* DbParameterCollectionBase.cs: Class name changed according to
the documentation
* DbDataReaderBase.cs: Added internal constructor to satisfy
SqlDataReader, which takes command object.
* DbConnectionBase.cs: Added additional methods overriding
DbConnection

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

mcs/class/System.Data/System.Data.Common/ChangeLog
mcs/class/System.Data/System.Data.Common/DbCommand.cs
mcs/class/System.Data/System.Data.Common/DbConnection.cs
mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs
mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
mcs/class/System.Data/System.Data.ProviderBase/DbDataReaderBase.cs
mcs/class/System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs

index 409816376226d54371bcaf7ba0a6257ebaece2a9..8e9b8d55692c64b174fcbb9d8ed71f3f6c3ff9de 100755 (executable)
@@ -1,3 +1,9 @@
+2004-11-24  Sureshkumar T  <tsureshkumar@novell.com>
+
+       * DbProviderSupportedClasses.cs: Added correct enum values.
+       * DbConnection.cs: Missing virtual method EnlistTransaction Added.
+       * DbCommand.cs: Implemented ProviderFactory base factory methods.
+
 2004-11-22  Sureshkumar T  <tsureshkumar@novell.com>
 
        * DbConnectionStringBuilder.cs: Class for helping creation of db
index 74a7b4b13e9fb3be51aeab43050c3b5425462557..cee239e54a6296411e995af96a5070b6142413b6 100644 (file)
@@ -54,7 +54,7 @@ namespace System.Data.Common {
                }
 
                protected abstract DbConnection DbConnection { get; set; }
-               protected abstract DbParameterCollection DbParameterCollection { get; set; }
+               protected abstract DbParameterCollection DbParameterCollection { get; }
                protected abstract DbTransaction DbTransaction { get; set; }
                public abstract bool DesignTimeVisible { get; set; }
 
@@ -109,21 +109,20 @@ namespace System.Data.Common {
                }
 
                public abstract int ExecuteNonQuery ();
-               public DbDataReader ExecutePageReader (CommandBehavior behavior, int startRecord, int maxRecords)
+               
+                public DbDataReader ExecutePageReader (CommandBehavior behavior, int startRecord, int maxRecords)
                {
                        return ExecuteDbPageReader (behavior, startRecord, maxRecords);
                }
 
-               [MonoTODO]
                public DbDataReader ExecuteReader ()
                {
-                       throw new NotImplementedException ();
+                       return ExecuteDbDataReader (CommandBehavior.Default);
                }
 
-               [MonoTODO]
                public DbDataReader ExecuteReader (CommandBehavior behavior)
                {
-                       throw new NotImplementedException ();
+                        return ExecuteDbDataReader (behavior);
                }
 
                public abstract object ExecuteScalar ();
index 82bd5648a7de937e55a2c83b0ebab9a760d6e76d..e53955ad2f7d7a527a3fb646b51d4f91c4b28799 100644 (file)
@@ -84,6 +84,12 @@ namespace System.Data.Common {
 
                protected abstract DbCommand CreateDbCommand ();
 
+                [MonoTODO]
+                public virtual void EnlistTransaction (ITransaction transaction)
+                {
+                       throw new NotImplementedException ();                        
+                }
+
                [MonoTODO]
                public virtual void EnlistDistributedTransaction (ITransaction transaction)
                {
index 6251397a2a01115031c72f84e67bf88d497d3eb2..a368bf3f224a432c772c1e61cd33fd75525a8a6e 100644 (file)
@@ -2,6 +2,7 @@
 // System.Data.Common.DbProviderSupportedClasses.cs
 //
 // Author:
+//   Sureshkumar T (tsureshkumar@novell.com)
 //   Tim Coleman (tim@timcoleman.com)
 //
 // Copyright (C) Tim Coleman, 2003
 namespace System.Data.Common {
        public enum DbProviderSupportedClasses 
        {
-               CodeAccessPermission,
-               DbCommand,
-               DbCommandBuilder,
-               DbCommandSet,
-               DbConnection,
-               DbDataAdapter,
-               DbDataSourceEnumerator,
-               DbParameter,
-               DbTable,
-               None
+                CodeAccessPermission = 0x80,
+                DbCommand = 0x02,
+                DbCommandBuilder = 0x10,
+                DbCommandSet = 0x100,
+                DbConnection = 0x01,
+                DbConnectionStringBuilder = 0x08,
+                DbDataAdapter = 0x20,
+                DbDataSourceEnumerator = 0x40,
+                DbParameter = 0x04,
+                None = 0x00
        }
 }
 
index fc65d1a1f6b51050c2c802f09892d5ff474af1fc..a4926fb740775585f7ada95696138215f3ac4c79 100755 (executable)
@@ -1,3 +1,12 @@
+2004-11-24  Sureshkumar T  <tsureshkumar@novell.com>
+
+       * DbParameterCollectionBase.cs: Class name changed according to
+       the documentation
+       * DbDataReaderBase.cs: Added internal constructor to satisfy
+       SqlDataReader, which takes command object.
+       * DbConnectionBase.cs: Added additional methods overriding
+       DbConnection
+
 2003-12-28  Tim Coleman <tim@timcoleman.com>
        * DbParameterBase.cs:
                Correct type of ValueSize method to int
index cb3e83afcf3f666f6be3ec4060b33b19009a1334..62b413bd99b1a026b87bbd934919c065c48f792a 100644 (file)
@@ -57,6 +57,11 @@ namespace System.Data.ProviderBase {
                {
                        this.connectionFactory = connectionFactory;
                }
+
+                protected DbConnectionBase ()
+                {
+                        
+                }
                
                #endregion // Constructors
 
@@ -164,6 +169,12 @@ namespace System.Data.ProviderBase {
                        throw new NotImplementedException ();
                }
 
+                [MonoTODO]
+                public override void EnlistTransaction (ITransaction transaction)
+                {
+                       throw new NotImplementedException ();                        
+                }
+
                [MonoTODO]
                protected virtual DbMetaDataFactory GetMetaDataFactory (DbConnectionInternal internalConnection)
                {
@@ -182,6 +193,24 @@ namespace System.Data.ProviderBase {
                        throw new NotImplementedException ();
                }
 
+               [MonoTODO]
+               public override DataTable GetSchema ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override DataTable GetSchema (string collectionName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override DataTable GetSchema (string collectionName, string [] restrictionValues)
+               {
+                       throw new NotImplementedException ();
+               }
+
                #endregion // Methods
        }
 }
index e5e5f05fe2256bc26384f2df6da15cc021af5fd5..67384d05b8cf0dccda5e4e59f227babf4cb2fa9e 100644 (file)
@@ -52,6 +52,11 @@ namespace System.Data.ProviderBase {
                        this.behavior = behavior;
                }
 
+                internal DbDataReaderBase (DbCommand command)
+                {
+                        
+                }
+
                #endregion // Constructors
 
                #region Properties
index 7f853787be9a0107a8e4f5f3006dd11782759009..5ec78e949f8fccd214f278ad766f4aa7221d8bfb 100644 (file)
@@ -36,7 +36,7 @@ using System.Collections;
 using System.Data.Common;
 
 namespace System.Data.ProviderBase {
-       public abstract class DbParameterCollectionBase : DbParameterCollection
+       public abstract class DbParameterBaseCollection : DbParameterCollection
        {
                #region Fields
 
@@ -47,7 +47,7 @@ namespace System.Data.ProviderBase {
                #region Constructors
        
                [MonoTODO]
-               protected DbParameterCollectionBase ()
+               protected DbParameterBaseCollection ()
                {
                        list = new ArrayList ();
                }