2002-03-27 Rodrigo Moya <rodrigo@ximian.com>
authorRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Wed, 27 Mar 2002 14:51:07 +0000 (14:51 -0000)
committerRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Wed, 27 Mar 2002 14:51:07 +0000 (14:51 -0000)
* System.Data.SqlClient/SqlTransaction.cs: started implementation.

* System.Data.SqlClient/SqlConnection.cs (BeginTransaction):
implemented (2 methods).

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

mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlConnection.cs
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlTransaction.cs
mcs/class/Mono.Data.PostgreSqlClient/PgSqlConnection.cs
mcs/class/Mono.Data.PostgreSqlClient/PgSqlTransaction.cs
mcs/class/System.Data/ChangeLog
mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
mcs/class/System.Data/System.Data.SqlClient/SqlTransaction.cs

index 36cd4d06ba0b8324b413160564f5d971531379c8..53ef442e34aba2c366af6adf5c279018fd81d2f4 100644 (file)
@@ -14,26 +14,74 @@ namespace System.Data.SqlClient
        /// </summary>
        public class SqlConnection : IDBConnection
        {
-               SqlTransaction BeginTransaction();
+               #region methods
+               
+               public SqlTransaction BeginTransaction()
+               {
+                       return new SqlTransaction (this);
+               }
 
-               SqlTransaction BeginTransaction(IsolationLevel il);
+               public SqlTransaction BeginTransaction(IsolationLevel il)
+               {
+                       SqlTransaction xaction = new SqlTransaction (cnc);
+                       xaction.IsolationLevel = il;
 
-               void ChangeDatabase(string databaseName);
+                       return xaction;
+               }
 
-               void Close();
+               [MonoTODO]
+               public void ChangeDatabase(string databaseName)
+               {
+                       throw new NotImplementedException ();
+               }
+                               
+               [MonoTODO]
+               public void Close()
+               {
+                       throw new NotImplementedException ();
+               }
 
-               SqlCommand CreateCommand();
+               [MonoTODO]
+               public SqlCommand CreateCommand()
+               {
+                       throw new NotImplementedException ();
+               }
 
-               void Open();
+               [MonoTODO]
+               public void Open()
+               {
+                       throw new NotImplementedException ();
+               }
 
+               #endregion
 
-               string ConnectionString{get; set;}
+               #region properties
 
-               int ConnectionTimeout{get;}
+               [MonoTODO]
+               public string ConnectionString
+               {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
 
-               string Database{get;}
+               [MonoTODO]
+               public int ConnectionTimeout
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
-               ConnectionState State{get;}
+               [MonoTODO]
+               public string Database
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
+               [MonoTODO]
+               public ConnectionState State
+               {
+                       get { throw new NotImplementedException (); }
+               }
+
+               #endregion
        }
 }
index ff31fcfa2c4c8980e2e52f7cc48cfdbc3b56cc09..00682d1b1c39577762083d3032c049549ce6183b 100644 (file)
 namespace System.Data.SqlClient
 {
        /// <summary>
-       /// Represents a transaction to be performed at a SQL database.
+       /// Represents a transaction to be performed on a SQL database.
        /// </summary>
-       public interface SqlTransaction : IDbTransaction
+       public class SqlTransaction : IDbTransaction
        {
-               void Commit();
+               #region fields
+               
+               protected SqlConnection connection = null;
+
+               #endregion
+               
+               #region constructors
+               
+               public SqlTransaction (SqlConnection cnc)
+               {
+                       connection = cnc;
+               }
+
+               #endregion
 
-               void Rollback();
+               #region methods
                
-               SqlConnection Connection{get;}
+               public void Commit ()
+               {
+                       throw new NotImplementedException ();
+               }               
+
+               void Rollback()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               #endregion
+               
+               # region properties
+               
+               public SqlConnection Connection
+               {
+                       get { return connection; }
+               }
+
+               public IsolationLevel IsolationLevel
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
-               IsolationLevel IsolationLevel{get;}
-       }       
+               #endregion
+       }
 }
index 36cd4d06ba0b8324b413160564f5d971531379c8..53ef442e34aba2c366af6adf5c279018fd81d2f4 100644 (file)
@@ -14,26 +14,74 @@ namespace System.Data.SqlClient
        /// </summary>
        public class SqlConnection : IDBConnection
        {
-               SqlTransaction BeginTransaction();
+               #region methods
+               
+               public SqlTransaction BeginTransaction()
+               {
+                       return new SqlTransaction (this);
+               }
 
-               SqlTransaction BeginTransaction(IsolationLevel il);
+               public SqlTransaction BeginTransaction(IsolationLevel il)
+               {
+                       SqlTransaction xaction = new SqlTransaction (cnc);
+                       xaction.IsolationLevel = il;
 
-               void ChangeDatabase(string databaseName);
+                       return xaction;
+               }
 
-               void Close();
+               [MonoTODO]
+               public void ChangeDatabase(string databaseName)
+               {
+                       throw new NotImplementedException ();
+               }
+                               
+               [MonoTODO]
+               public void Close()
+               {
+                       throw new NotImplementedException ();
+               }
 
-               SqlCommand CreateCommand();
+               [MonoTODO]
+               public SqlCommand CreateCommand()
+               {
+                       throw new NotImplementedException ();
+               }
 
-               void Open();
+               [MonoTODO]
+               public void Open()
+               {
+                       throw new NotImplementedException ();
+               }
 
+               #endregion
 
-               string ConnectionString{get; set;}
+               #region properties
 
-               int ConnectionTimeout{get;}
+               [MonoTODO]
+               public string ConnectionString
+               {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
 
-               string Database{get;}
+               [MonoTODO]
+               public int ConnectionTimeout
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
-               ConnectionState State{get;}
+               [MonoTODO]
+               public string Database
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
+               [MonoTODO]
+               public ConnectionState State
+               {
+                       get { throw new NotImplementedException (); }
+               }
+
+               #endregion
        }
 }
index ff31fcfa2c4c8980e2e52f7cc48cfdbc3b56cc09..00682d1b1c39577762083d3032c049549ce6183b 100644 (file)
 namespace System.Data.SqlClient
 {
        /// <summary>
-       /// Represents a transaction to be performed at a SQL database.
+       /// Represents a transaction to be performed on a SQL database.
        /// </summary>
-       public interface SqlTransaction : IDbTransaction
+       public class SqlTransaction : IDbTransaction
        {
-               void Commit();
+               #region fields
+               
+               protected SqlConnection connection = null;
+
+               #endregion
+               
+               #region constructors
+               
+               public SqlTransaction (SqlConnection cnc)
+               {
+                       connection = cnc;
+               }
+
+               #endregion
 
-               void Rollback();
+               #region methods
                
-               SqlConnection Connection{get;}
+               public void Commit ()
+               {
+                       throw new NotImplementedException ();
+               }               
+
+               void Rollback()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               #endregion
+               
+               # region properties
+               
+               public SqlConnection Connection
+               {
+                       get { return connection; }
+               }
+
+               public IsolationLevel IsolationLevel
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
-               IsolationLevel IsolationLevel{get;}
-       }       
+               #endregion
+       }
 }
index 130b4b41cb4c94cceef5f74be0fde38a55a19adb..5a8931007d5547aec5f92c18c650201695bfd179 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-27  Rodrigo Moya <rodrigo@ximian.com>
+
+       * System.Data.SqlClient/SqlTransaction.cs: started implementation.
+       
+       * System.Data.SqlClient/SqlConnection.cs (BeginTransaction):
+       implemented (2 methods).
+
 2002-03-24  Duncan Mak  <duncan@ximian.com>
 
        * System.Data.build: Excluded System.Data.SqlClient from the build.
index 36cd4d06ba0b8324b413160564f5d971531379c8..53ef442e34aba2c366af6adf5c279018fd81d2f4 100644 (file)
@@ -14,26 +14,74 @@ namespace System.Data.SqlClient
        /// </summary>
        public class SqlConnection : IDBConnection
        {
-               SqlTransaction BeginTransaction();
+               #region methods
+               
+               public SqlTransaction BeginTransaction()
+               {
+                       return new SqlTransaction (this);
+               }
 
-               SqlTransaction BeginTransaction(IsolationLevel il);
+               public SqlTransaction BeginTransaction(IsolationLevel il)
+               {
+                       SqlTransaction xaction = new SqlTransaction (cnc);
+                       xaction.IsolationLevel = il;
 
-               void ChangeDatabase(string databaseName);
+                       return xaction;
+               }
 
-               void Close();
+               [MonoTODO]
+               public void ChangeDatabase(string databaseName)
+               {
+                       throw new NotImplementedException ();
+               }
+                               
+               [MonoTODO]
+               public void Close()
+               {
+                       throw new NotImplementedException ();
+               }
 
-               SqlCommand CreateCommand();
+               [MonoTODO]
+               public SqlCommand CreateCommand()
+               {
+                       throw new NotImplementedException ();
+               }
 
-               void Open();
+               [MonoTODO]
+               public void Open()
+               {
+                       throw new NotImplementedException ();
+               }
 
+               #endregion
 
-               string ConnectionString{get; set;}
+               #region properties
 
-               int ConnectionTimeout{get;}
+               [MonoTODO]
+               public string ConnectionString
+               {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
 
-               string Database{get;}
+               [MonoTODO]
+               public int ConnectionTimeout
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
-               ConnectionState State{get;}
+               [MonoTODO]
+               public string Database
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
+               [MonoTODO]
+               public ConnectionState State
+               {
+                       get { throw new NotImplementedException (); }
+               }
+
+               #endregion
        }
 }
index ff31fcfa2c4c8980e2e52f7cc48cfdbc3b56cc09..00682d1b1c39577762083d3032c049549ce6183b 100644 (file)
 namespace System.Data.SqlClient
 {
        /// <summary>
-       /// Represents a transaction to be performed at a SQL database.
+       /// Represents a transaction to be performed on a SQL database.
        /// </summary>
-       public interface SqlTransaction : IDbTransaction
+       public class SqlTransaction : IDbTransaction
        {
-               void Commit();
+               #region fields
+               
+               protected SqlConnection connection = null;
+
+               #endregion
+               
+               #region constructors
+               
+               public SqlTransaction (SqlConnection cnc)
+               {
+                       connection = cnc;
+               }
+
+               #endregion
 
-               void Rollback();
+               #region methods
                
-               SqlConnection Connection{get;}
+               public void Commit ()
+               {
+                       throw new NotImplementedException ();
+               }               
+
+               void Rollback()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               #endregion
+               
+               # region properties
+               
+               public SqlConnection Connection
+               {
+                       get { return connection; }
+               }
+
+               public IsolationLevel IsolationLevel
+               {
+                       get { throw new NotImplementedException (); }
+               }
 
-               IsolationLevel IsolationLevel{get;}
-       }       
+               #endregion
+       }
 }