Author: gbayon
Date: Tue Apr 25 10:23:12 2006
New Revision: 396927
URL: http://svn.apache.org/viewcvs?rev=396927&view=rev
Log:
Support for IBATISNET-156
Allow usage of Multiple Active Result Sets (MARS) per connection.
Modified:
ibatis/trunk/cs/mapper/IBatisNet.Common/DbProvider.cs
ibatis/trunk/cs/mapper/IBatisNet.Common/IDbProvider.cs
ibatis/trunk/cs/mapper/IBatisNet.Common/provider.xsd
Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/DbProvider.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/DbProvider.cs?rev=396927&r1=396926&r2=396927&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/DbProvider.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/DbProvider.cs Tue Apr 25 10:23:12
2006
@@ -1,7 +1,7 @@
#region Apache Notice
/*****************************************************************************
- * $Revision: 374175 $
+ * $Revision$
* $LastChangedDate$
* $LastChangedBy$
*
@@ -100,6 +100,8 @@
private bool _setDbParameterScale = true;
[NonSerialized]
private bool _useDeriveParameters = true;
+ [NonSerialized]
+ private bool _allowMARS = false;
// private static readonly ILog _connectionLogger =
LogManager.GetLogger("System.Data.IDbConnection");
@@ -148,6 +150,22 @@
set {_isEnabled = value;}
}
+ /// <summary>
+ /// Tell us if this provider allows having multiple open <see
cref="IDataReader"/> with
+ /// the same <see cref="IDbConnection"/>.
+ /// </summary>
+ /// <remarks>
+ /// It's a new feature in ADO.NET 2.0 and Sql Server 2005 that
allows for multiple forward only read only result sets (MARS).
+ /// Some databases have supported this functionality for a long
time :
+ /// Not Supported : DB2, MySql.Data, OLE DB provider [except
Sql Server 2005 when using MDAC 9], SQLite, Obdc
+ /// Supported : Sql Server 2005, Npgsql
+ /// </remarks>
+ [XmlAttribute("allowMARS")]
+ public bool AllowMARS
+ {
+ get { return _allowMARS; }
+ set {_allowMARS = value;}
+ }
/// <summary>
/// The connection class name to use.
Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/IDbProvider.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/IDbProvider.cs?rev=396927&r1=396926&r2=396927&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/IDbProvider.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/IDbProvider.cs Tue Apr 25 10:23:12
2006
@@ -31,6 +31,13 @@
bool IsEnabled { get; set; }
/// <summary>
+ /// Tell us if this provider allows having multiple open <see
cref="IDataReader"/> with
+ /// the same <see cref="IDbConnection"/>.
+ /// </summary>
+ [XmlAttribute("allowMultipleActiveDataReaders")]
+ bool AllowMARS { get; set; }
+
+ /// <summary>
/// The connection class name to use.
/// </summary>
/// <example>
Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/provider.xsd
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/provider.xsd?rev=396927&r1=396926&r2=396927&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/provider.xsd (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/provider.xsd Tue Apr 25 10:23:12
2006
@@ -38,7 +38,7 @@
<xs:attribute name="setDbParameterPrecision" type="xs:boolean"/>
<xs:attribute name="setDbParameterScale" type="xs:boolean"/>
<xs:attribute name="setDbParameterSize" type="xs:boolean"/>
- <xs:attribute name="allowPreparingCommands" type="xs:boolean"/>
+ <xs:attribute name="allowMARS" type="xs:boolean"
default="false"/>
</xs:complexType>
</xs:element>
<xs:element name="providers">