You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2006/02/08 22:27:11 UTC
svn commit: r376076 - in /ibatis/trunk/cs/mapper:
IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/
IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Oracle/ IBatisNet.DataMapper/
IBatisNet.DataMapper/MappedStatements/
Author: gbayon
Date: Wed Feb 8 13:27:10 2006
New Revision: 376076
URL: http://svn.apache.org/viewcvs?rev=376076&view=rev
Log:
- Added conditional compilation for .NET V2
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/ProcedureTest.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Oracle/ProcedureTest.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/ProcedureTest.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/ProcedureTest.cs?rev=376076&r1=376075&r2=376076&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/ProcedureTest.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/ProcedureTest.cs Wed Feb 8 13:27:10 2006
@@ -97,24 +97,24 @@
}
- /// <summary>
- /// Test Insert Account via store procedure
- /// </summary>
- [Test]
- public void TestInsertAccountViaStoreProcedure() {
- Account account = new Account();
-
- account.Id = 99;
- account.FirstName = "Achille";
- account.LastName = "Talon";
- account.EmailAddress = "Achille.Talon@somewhere.com";
-
- sqlMap.Insert("InsertAccountViaStoreProcedure", account);
-
- Account testAccount = sqlMap.QueryForObject("GetAccountViaColumnName", 99) as Account;
-
- Assert.IsNotNull(testAccount);
- Assert.AreEqual(99, testAccount.Id);
+ /// <summary>
+ /// Test Insert Account via store procedure
+ /// </summary>
+ [Test]
+ public void TestInsertAccountViaStoreProcedure() {
+ Account account = new Account();
+
+ account.Id = 99;
+ account.FirstName = "Achille";
+ account.LastName = "Talon";
+ account.EmailAddress = "Achille.Talon@somewhere.com";
+
+ sqlMap.Insert("InsertAccountViaStoreProcedure", account);
+
+ Account testAccount = sqlMap.QueryForObject("GetAccountViaColumnName", 99) as Account;
+
+ Assert.IsNotNull(testAccount);
+ Assert.AreEqual(99, testAccount.Id);
}
#endregion
}
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Oracle/ProcedureTest.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Oracle/ProcedureTest.cs?rev=376076&r1=376075&r2=376076&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Oracle/ProcedureTest.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Oracle/ProcedureTest.cs Wed Feb 8 13:27:10 2006
@@ -99,24 +99,24 @@
}
- /// <summary>
- /// Test Insert Account via store procedure
- /// </summary>
- [Test]
- public void TestInsertAccountViaStoreProcedure() {
- Account account = new Account();
-
- account.Id = 99;
- account.FirstName = "Achille";
- account.LastName = "Talon";
- account.EmailAddress = "Achille.Talon@somewhere.com";
-
- sqlMap.Insert("InsertAccountViaStoreProcedure", account);
-
- Account testAccount = sqlMap.QueryForObject("GetAccountViaColumnName", 99) as Account;
-
- Assert.IsNotNull(testAccount);
- Assert.AreEqual(99, testAccount.Id);
+ /// <summary>
+ /// Test Insert Account via store procedure
+ /// </summary>
+ [Test]
+ public void TestInsertAccountViaStoreProcedure() {
+ Account account = new Account();
+
+ account.Id = 99;
+ account.FirstName = "Achille";
+ account.LastName = "Talon";
+ account.EmailAddress = "Achille.Talon@somewhere.com";
+
+ sqlMap.Insert("InsertAccountViaStoreProcedure", account);
+
+ Account testAccount = sqlMap.QueryForObject("GetAccountViaColumnName", 99) as Account;
+
+ Assert.IsNotNull(testAccount);
+ Assert.AreEqual(99, testAccount.Id);
}
/// <summary>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs?rev=376076&r1=376075&r2=376076&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs Wed Feb 8 13:27:10 2006
@@ -382,7 +382,8 @@
return _mappedStatement.ExecuteQueryForRowDelegate(session, parameterObject, rowDelegate);
}
- /// <summary>
+#if dotnet2
+ /// <summary>
/// Runs a query with a custom object that gets a chance
/// to deal with each row as it is processed.
/// </summary>
@@ -393,6 +394,7 @@
{
return _mappedStatement.ExecuteQueryForRowDelegate<T>(session, parameterObject, rowDelegate);
}
+#endif
/// <summary>
/// Runs a query with a custom object that gets a chance
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs?rev=376076&r1=376075&r2=376076&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs Wed Feb 8 13:27:10 2006
@@ -169,7 +169,7 @@
#endregion
#region ExecuteQueryForList .NET 2.0
- #if dotnet2
+#if dotnet2
/// <summary>
/// Executes the SQL and and fill a strongly typed collection.
/// </summary>
@@ -196,7 +196,7 @@
/// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
/// <returns>A List of result objects.</returns>
IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject);
- #endif
+#endif
#endregion
#region ExecuteForObject
@@ -222,7 +222,7 @@
#endregion
#region ExecuteForObject .NET 2.0
- #if dotnet2
+#if dotnet2
/// <summary>
/// Executes an SQL statement that returns a single row as an Object.
@@ -241,7 +241,7 @@
/// <param name="resultObject">The result object.</param>
/// <returns>The object</returns>
T ExecuteQueryForObject<T>(IDalSession session, object parameterObject, T resultObject);
- #endif
+#endif
#endregion
#region Delegate
@@ -256,16 +256,7 @@
/// <returns></returns>
IList ExecuteQueryForRowDelegate( IDalSession session, object parameterObject, SqlMapper.RowDelegate rowDelegate );
- /// <summary>
- /// Runs a query with a custom object that gets a chance
- /// to deal with each row as it is processed.
- /// </summary>
- /// <param name="session">The session used to execute the statement.</param>
- /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
- /// <param name="rowDelegate"></param>param>
- /// <returns></returns>
- IList<T> ExecuteQueryForRowDelegate<T>(IDalSession session, object parameterObject, SqlMapper.RowDelegate<T> rowDelegate);
-
+
/// <summary>
/// Runs a query with a custom object that gets a chance
/// to deal with each row as it is processed.
@@ -281,5 +272,18 @@
#endregion
- }
+ #region ExecuteQueryForRowDelegate .NET 2.0
+#if dotnet2
+ /// <summary>
+ /// Runs a query with a custom object that gets a chance
+ /// to deal with each row as it is processed.
+ /// </summary>
+ /// <param name="session">The session used to execute the statement.</param>
+ /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
+ /// <param name="rowDelegate"></param>param>
+ /// <returns></returns>
+ IList<T> ExecuteQueryForRowDelegate<T>(IDalSession session, object parameterObject, SqlMapper.RowDelegate<T> rowDelegate);
+#endif
+ #endregion
+ }
}
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs?rev=376076&r1=376075&r2=376076&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs Wed Feb 8 13:27:10 2006
@@ -62,6 +62,7 @@
/// <param name="list">The IList that will be returned to the caller.</param>
public delegate void RowDelegate(object obj, object parameterObject, IList list);
+#if dotnet2
/// <summary>
/// A delegate called once per row in the QueryWithRowDelegate method
/// </summary>
@@ -69,6 +70,7 @@
/// <param name="parameterObject">The optional parameter object passed into the QueryWithRowDelegate method.</param>
/// <param name="list">The IList that will be returned to the caller.</param>
public delegate void RowDelegate<T>(object obj, object parameterObject, IList<T> list);
+#endif
/// <summary>
/// A delegate called once per row in the QueryForMapWithRowDelegate method