* System.Data.SqlClient/SqlTransaction.cs: started implementation.
* System.Data.SqlClient/SqlConnection.cs (BeginTransaction):
implemented (2 methods).
svn path=/trunk/mcs/; revision=3397
/// </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
}
}
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
+ }
}
/// </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
}
}
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
+ }
}
+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.
/// </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
}
}
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
+ }
}