Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv308/NHibernate/Hql
Modified Files:
WhereParser.cs
Log Message:
Parameter classes are now immutable. All values must be set in the ctor.
Index: WhereParser.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/WhereParser.cs,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** WhereParser.cs 31 Dec 2004 18:22:14 -0000 1.27
--- WhereParser.cs 30 Jan 2005 19:39:12 -0000 1.28
***************
*** 481,485 ****
{
q.AddNamedParameter( token.Substring( 1 ) );
! AppendToken( q, new SqlString( new object[ ] {new Parameter()} ) );
}
else if( token.Equals( StringHelper.SqlParameter ) )
--- 481,488 ----
{
q.AddNamedParameter( token.Substring( 1 ) );
! // this is only a temporary parameter to help with the parsing of hql -
! // when the type becomes known then this will be converted to its real
! // parameter type.
! AppendToken( q, new SqlString( new object[ ] {new Parameter( StringHelper.SqlParameter )} ) );
}
else if( token.Equals( StringHelper.SqlParameter ) )
***************
*** 487,491 ****
//if the token is a "?" then we have a Parameter so convert it to a SqlCommand.Parameter
// instead of appending a "?" to the WhereTokens
! q.AppendWhereToken( new SqlString( new object[ ] {new Parameter()} ) );
}
else
--- 490,494 ----
//if the token is a "?" then we have a Parameter so convert it to a SqlCommand.Parameter
// instead of appending a "?" to the WhereTokens
! q.AppendWhereToken( new SqlString( new object[ ] {new Parameter( StringHelper.SqlParameter)} ) );
}
else
|