Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2046/NHibernate/SqlCommand
Modified Files:
Template.cs
Log Message:
Solved some quoting problem, found problem with Alias class.
Index: Template.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Template.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Template.cs 14 Apr 2004 14:48:47 -0000 1.2
--- Template.cs 15 Apr 2004 09:30:16 -0000 1.3
***************
*** 189,202 ****
}
- [Obsolete("Should use Quote functions")]
private static string Quote(string column, Dialect.Dialect dialect)
{
if ( column[0] == '`' )
{
! return dialect.OpenQuote + column.Substring(1, column.Length - 2) + dialect.CloseQuote;
}
else
{
! return column;
}
}
--- 189,204 ----
}
private static string Quote(string column, Dialect.Dialect dialect)
{
+
if ( column[0] == '`' )
{
! if (column[column.Length -1] != '`')
! throw new ArgumentException("missing ` in column " + column);
! return dialect.QuoteForAliasName(column.Substring(1, column.Length - 2));
}
else
{
! return dialect.QuoteForAliasName(column);
}
}
|