ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgrabow...@apache.org
Subject svn commit: r379965 - in /ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test: Maps/Access/OleDb/ Maps/MSSQL/Odbc/ Maps/MSSQL/OleDb/ Maps/MSSQL/SqlClient/ Maps/MySql/ByteFx/ Maps/MySql/MySql/ Maps/Oracle/ODP/ Maps/Oracle/OracleClient/ Maps/PostgreSQL/Npgs...
Date Wed, 22 Feb 2006 23:13:48 GMT
Author: rgrabowski
Date: Wed Feb 22 15:13:45 2006
New Revision: 379965

URL: http://svn.apache.org/viewcvs?rev=379965&view=rev
Log:
Added missing files for IBATISNET-139

Added:
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ParameterClass.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterClass.cs

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/ParameterClass.xml
(added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/ParameterClass.xml
Wed Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ParameterClass.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ParameterClass.xml Wed
Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/ParameterClass.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/ParameterClass.xml Wed
Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ParameterClass.xml
(added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ParameterClass.xml
Wed Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/ParameterClass.xml
(added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/ParameterClass.xml
Wed Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml Wed
Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/ParameterClass.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/ParameterClass.xml Wed
Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/ParameterClass.xml
(added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/ParameterClass.xml
Wed Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ParameterClass.xml?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ParameterClass.xml
(added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ParameterClass.xml
Wed Feb 22 15:13:45 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
+	<statements>
+		<select id="GetCountOfAccountsWithNullEmail">
+			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
+		</select>	
+		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
+			UPDATE Accounts SET
+				Account_Email = #DBNullValue#
+			WHERE
+				Account_Email IS NULL
+		</update>		
+	</statements>	
+</sqlMap>
\ No newline at end of file

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterClass.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterClass.cs?rev=379965&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterClass.cs (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterClass.cs Wed
Feb 22 15:13:45 2006
@@ -0,0 +1,28 @@
+using System;
+using System.Collections;
+using NUnit.Framework;
+
+namespace IBatisNet.DataMapper.Test.NUnit.SqlMapTests
+{
+	/// <summary>
+	/// Summary description for ResultClassTest.
+	/// </summary>
+	[TestFixture] 
+	public class ParameterClass : BaseTest
+	{
+		/// <summary>
+		///  Test passing DBNull.Value to a statement.
+		/// </summary>
+		[Test]
+		public void TestDBNullValue()
+		{
+			int accountsWithNullEmail = (int)sqlMap.QueryForObject("GetCountOfAccountsWithNullEmail",
null);
+
+			Hashtable map = new Hashtable();
+			map["DBNullValue"] = DBNull.Value;
+			int rowsAffected = sqlMap.Update("UpdateNullEmailToDBNull", map);
+
+			Assert.AreEqual(accountsWithNullEmail, rowsAffected);
+		}
+	}
+}



Mime
View raw message