Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18398/NHibernate/Sql
Modified Files:
Alias.cs
Log Message:
Looks like fixed the alias thing.
Index: Alias.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql/Alias.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Alias.cs 15 Apr 2004 13:21:18 -0000 1.5
--- Alias.cs 15 Apr 2004 13:40:43 -0000 1.6
***************
*** 27,77 ****
public string ToAliasString(string sqlIdentifier, Dialect.Dialect dialect)
{
! return dialect.QuoteForAliasName(sqlIdentifier);
! char begin = sqlIdentifier[0];
! int quoteType = Dialect.Dialect.Quote.IndexOf(begin);
!
! string unquoted;
!
! if ( quoteType>=0 )
! {
! unquoted = sqlIdentifier.Substring(1, sqlIdentifier.Length-1 );
! }
! else
{
! unquoted = sqlIdentifier;
}
! if ( unquoted.Length > length )
{
! unquoted = unquoted.Substring(0, length);
}
! if (suffix!=null) unquoted += suffix;
! if ( quoteType >= 0 )
! {
! char endQuote = Dialect.Dialect.ClosedQuote[quoteType];
! return begin + unquoted + endQuote;
! }
! else
! {
! return unquoted;
! }
}
public string ToUnquotedAliasString(string sqlIdentifier, Dialect.Dialect dialect)
{
! char begin = sqlIdentifier[0];
! int quoteType = Dialect.Dialect.Quote.IndexOf(begin);
! string unquoted;
!
! if(quoteType >= 0)
! {
! unquoted = sqlIdentifier.Substring(1, sqlIdentifier.Length - 2);
! }
! else
! {
! unquoted = sqlIdentifier;
! }
if(unquoted.Length > length)
--- 27,48 ----
public string ToAliasString(string sqlIdentifier, Dialect.Dialect dialect)
{
! if (dialect.UnQuote(sqlIdentifier) != sqlIdentifier)
{
! sqlIdentifier = dialect.UnQuote(sqlIdentifier);
}
! if ( sqlIdentifier.Length > length )
{
! sqlIdentifier = sqlIdentifier.Substring(0, length);
}
! if (suffix!=null) sqlIdentifier += suffix;
! return dialect.QuoteForAliasName(sqlIdentifier);
}
public string ToUnquotedAliasString(string sqlIdentifier, Dialect.Dialect dialect)
{
! string unquoted = dialect.UnQuote(sqlIdentifier);
if(unquoted.Length > length)
|