From: Michael D. <mik...@us...> - 2004-10-29 05:54:00
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Loader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16427/NHibernate/Loader Modified Files: Loader.cs Log Message: Removed scrollableresults and fetchsize - no meaning in .net Index: Loader.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Loader/Loader.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Loader.cs 14 Oct 2004 04:33:14 -0000 1.36 --- Loader.cs 29 Oct 2004 05:53:49 -0000 1.37 *************** *** 510,533 **** /// <param name="selection"></param> /// <param name="session"></param> ! protected void Advance(IDataReader rs, RowSelection selection, ISessionImplementor session) { int firstRow = Loader.GetFirstRow(selection); ! if(firstRow!=0) { ! if(session.Factory.UseScrollableResultSets ) ! { ! //TODO: H2.0.3 synch, but I'm not sure if needed because of diff ! // between JDBC's ResultSet & ADO.NET's DataReader ! //rs.absolute(firstRow); ! for(int i = 0; i < firstRow; i++) ! { ! rs.Read(); ! } ! } ! else { ! for(int i = 0; i < firstRow; i++) ! { ! rs.Read(); ! } } } --- 510,522 ---- /// <param name="selection"></param> /// <param name="session"></param> ! protected void Advance(IDataReader rs, RowSelection selection, ISessionImplementor session) ! { int firstRow = Loader.GetFirstRow(selection); ! ! if( firstRow!=0 ) { ! for(int i = 0; i < firstRow; i++) { ! rs.Read(); } } *************** *** 575,582 **** bool useLimit = UseLimit(selection, dialect); ! bool scrollable = session.Factory.UseScrollableResultSets && ( ! scroll || ! (!useLimit && GetFirstRow(selection)!=0) ! ); if(useLimit) sqlString = dialect.GetLimitString(sqlString); --- 564,568 ---- bool useLimit = UseLimit(selection, dialect); ! bool scrollable = scroll || (!useLimit && GetFirstRow(selection)!=0); if(useLimit) sqlString = dialect.GetLimitString(sqlString); |