|
From: <pa...@us...> - 2011-03-06 03:59:51
|
Revision: 5430
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5430&view=rev
Author: patearl
Date: 2011-03-06 03:59:45 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
SQLite: Added trim emulation function.
SQLite: Improved quoting on date extraction functions.
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs
Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 03:58:22 UTC (rev 5429)
+++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 03:59:45 UTC (rev 5430)
@@ -47,13 +47,14 @@
RegisterColumnType(DbType.Boolean, "INTEGER");
RegisterColumnType(DbType.Guid, "UNIQUEIDENTIFIER");
- RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%S\", ?1)"));
- RegisterFunction("minute", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%M\", ?1)"));
- RegisterFunction("hour", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%H\", ?1)"));
- RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%d\", ?1)"));
- RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%m\", ?1)"));
- RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%Y\", ?1)"));
+ RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%S', ?1)"));
+ RegisterFunction("minute", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%M', ?1)"));
+ RegisterFunction("hour", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%H', ?1)"));
+ RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%d', ?1)"));
+ RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%m', ?1)"));
+ RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%Y', ?1)"));
RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String));
+ RegisterFunction("trim", new AnsiTrimEmulationFunction());
}
public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|