From: <fab...@us...> - 2009-02-04 14:28:17
|
Revision: 4036 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4036&view=rev Author: fabiomaulo Date: 2009-02-04 14:28:13 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2009-02-04 13:53:38 UTC (rev 4035) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2009-02-04 14:28:13 UTC (rev 4036) @@ -557,7 +557,7 @@ #endregion #region keyword support - protected internal virtual void RegisterKeyword(string word) + protected void RegisterKeyword(string word) { Keywords.Add(word); } Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-02-04 13:53:38 UTC (rev 4035) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-02-04 14:28:13 UTC (rev 4036) @@ -122,35 +122,7 @@ RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(day, ?1)")); RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(month, ?1)")); RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(year, ?1)")); - RegisterFunction("concat", new VarArgsSQLFunction(NHibernateUtil.String, "(", "+", ")")); - /* - RegisterFunction("julian_day", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("microsecond", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("midnight_seconds", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("monthname", new StandardSQLFunction( NHibernateUtil.String ) ); - RegisterFunction("quarter", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("date", new StandardSQLFunction(Hibernate.DATE) ); - RegisterFunction("dayname", new StandardSQLFunction( NHibernateUtil.String ) ); - RegisterFunction("dayofweek", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("dayofweek_iso", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("dayofyear", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("days", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("time", new StandardSQLFunction( NHibernateUtil.Time ) ); - RegisterFunction("timestamp", new StandardSQLFunction( NHibernateUtil.Timestamp ) ); - RegisterFunction("timestamp_iso", new StandardSQLFunction( NHibernateUtil.Timestamp ) ); - RegisterFunction("week", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("week_iso", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - - RegisterFunction("double", new StandardSQLFunction( NHibernateUtil.Double ) ); - RegisterFunction("varchar", new StandardSQLFunction( NHibernateUtil.String ) ); - RegisterFunction("real", new StandardSQLFunction( NHibernateUtil.Single ) ); - RegisterFunction("bigint", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("char", new StandardSQLFunction( NHibernateUtil.Character ) ); - RegisterFunction("integer", new StandardSQLFunction( NHibernateUtil.Int32 ) ); - RegisterFunction("smallint", new StandardSQLFunction( NHibernateUtil.Int16 ) ); - */ - RegisterFunction("digits", new StandardSQLFunction("digits", NHibernateUtil.String)); RegisterFunction("chr", new StandardSQLFunction("chr", NHibernateUtil.Character)); RegisterFunction("upper", new StandardSQLFunction("upper")); @@ -163,6 +135,8 @@ RegisterFunction("trim", new AnsiTrimEmulationFunction()); RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end")); + RegisterKeyword("top"); + DefaultProperties[Environment.ConnectionDriver] = "NHibernate.Driver.SqlClientDriver"; DefaultProperties[Environment.PrepareSql] = "false"; } Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-02-04 13:53:38 UTC (rev 4035) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-02-04 14:28:13 UTC (rev 4036) @@ -16,7 +16,6 @@ RegisterColumnType(DbType.String, 1073741823, "NVARCHAR(MAX)"); RegisterColumnType(DbType.AnsiString, 2147483647, "VARCHAR(MAX)"); RegisterColumnType(DbType.Binary, 2147483647, "VARBINARY(MAX)"); - RegisterKeyword("top"); } /// <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |