Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22643/NHibernate/Driver
Modified Files:
DriverBase.cs IDriver.cs
Log Message:
Added a property to indicate if the Data Provider supports Multiple Open
IDataReaders. If you're Driver supports having more than 1 open
IDataReader at the same time against the same IDbConnection then override
this with true.
MsSql2000 is a DataProvider that only supports 1 open IDataReader. I don't
know about the other Data Providers so they have not overridden the base
class which default to false.
Index: DriverBase.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Driver/DriverBase.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DriverBase.cs 10 Mar 2004 15:36:46 -0000 1.1
--- DriverBase.cs 6 May 2004 13:13:11 -0000 1.2
***************
*** 67,70 ****
--- 67,75 ----
}
+ public bool SupportsMultipleOpenReaders
+ {
+ get { return false;}
+ }
+
#endregion
}
Index: IDriver.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Driver/IDriver.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IDriver.cs 10 Mar 2004 15:36:46 -0000 1.1
--- IDriver.cs 6 May 2004 13:13:12 -0000 1.2
***************
*** 125,129 ****
string FormatNameForParameter(string tableAlias, string parameterName);
!
}
--- 125,147 ----
string FormatNameForParameter(string tableAlias, string parameterName);
! /// <summary>
! /// Does this Driver support having more than 1 open IDataReader with
! /// the same IDbConnection.
! /// </summary>
! /// <remarks>
! /// <para>
! /// A value of <c>false</c> indicates that an exception would be thrown if NHibernate
! /// attempted to have 2 IDataReaders open using the same IDbConnection. NHibernate
! /// (since this version is a close to straight port of Hibernate) relies on the
! /// ability to recursively open 2 IDataReaders. If the Driver does not support it
! /// then NHibernate will read the values from the IDataReader into an <see cref="NDataReader"/>.
! /// </para>
! /// <para>
! /// A value of <c>true</c> will result in greater performance because an IDataReader can be used
! /// instead of the <see cref="NDataReader"/>. So if the Driver supports it then make sure
! /// it is set to <c>true</c>.
! /// </para>
! /// </remarks>
! bool SupportsMultipleOpenReaders { get; }
}
|