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 2005/05/05 11:39:37 UTC
svn commit: r168304 - /incubator/ibatis/trunk/cs/mapper/IBatisNet.Common
/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP
/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug
/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements
Author: gbayon
Date: Thu May 5 02:39:36 2005
New Revision: 168304
URL: http://svn.apache.org/viewcvs?rev=168304&view=rev
Log:
- Updated code to include UseDeriveParameters, Roberto need to test it for ODP provider
Modified:
incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/DataSource.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Provider.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/DataSource.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/DataSource.cs?rev=168304&r1=168303&r2=168304&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/DataSource.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/DataSource.cs Thu May 5 02:39:36 2005
@@ -25,9 +25,10 @@
#endregion
#region Using
+
using System;
-using System.Runtime.Serialization;
using System.Xml.Serialization;
+
#endregion
namespace IBatisNet.Common
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Provider.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Provider.cs?rev=168304&r1=168303&r2=168304&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Provider.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Provider.cs Thu May 5 02:39:36 2005
@@ -25,19 +25,15 @@
#endregion
#region Using
+
using System;
using System.Data;
-
-using System.Data.SqlClient;
-
-using System.Xml.Serialization;
using System.Reflection;
-
+using System.Xml.Serialization;
using IBatisNet.Common.Exceptions;
-using IBatisNet.Common.Logging;
using IBatisNet.Common.Utilities.TypesResolver;
+//using log4net;
-using log4net;
#endregion
namespace IBatisNet.Common
@@ -109,9 +105,10 @@
private bool _setDbParameterPrecision = true;
[NonSerialized]
private bool _setDbParameterScale = true;
-
+ [NonSerialized]
+ private bool _useDeriveParameters = true;
- private static readonly ILog _connectionLogger = LogManager.GetLogger("System.Data.IDbConnection");
+// private static readonly ILog _connectionLogger = LogManager.GetLogger("System.Data.IDbConnection");
#endregion
@@ -268,6 +265,17 @@
}
/// <summary>
+ /// Used to indicate whether or not the provider
+ /// supports DeriveParameters method for procedure.
+ /// </summary>
+ [XmlAttribute("useDeriveParameters")]
+ public bool UseDeriveParameters
+ {
+ get { return _useDeriveParameters; }
+ set { _useDeriveParameters = value; }
+ }
+
+ /// <summary>
/// The command class name to use.
/// </summary>
/// <example>
@@ -433,7 +441,7 @@
/// <summary>
/// Check if this provider is Odbc ?
/// </summary>
- [XmlIgnoreAttribute]
+ [XmlIgnore]
public bool IsObdc
{
get
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml?rev=168304&r1=168303&r2=168304&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml Thu May 5 02:39:36 2005
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="Schemas\SqlMap.xsd">
+ xsi:noNamespaceSchemaLocation="SqlMap.xsd">
<!-- =============================================
<resultMap
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config?rev=168304&r1=168303&r2=168304&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config Thu May 5 02:39:36 2005
@@ -103,6 +103,7 @@
useParameterPrefixInSql = "true"
useParameterPrefixInParameter = "false"
parameterPrefix=":"
+ useDeriveParameters="false"
/>
<provider
name="oracleClient1.0"
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs?rev=168304&r1=168303&r2=168304&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs Thu May 5 02:39:36 2005
@@ -108,7 +108,15 @@
}
else // use the parameterMap
{
- DiscoverParameter(_session);
+ if (_session.DataSource.Provider.UseDeriveParameters)
+ {
+ DiscoverParameter(_session);
+ }
+ else
+ {
+ CreateParametersForStatementText();
+ EvaluateParameterMap();
+ }
}
#region Fix for Odbc