|
From: <pa...@us...> - 2011-03-06 20:39:35
|
Revision: 5438
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5438&view=rev
Author: patearl
Date: 2011-03-06 20:39:29 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
SQLite: Added "iff" function. Ignore some unsupported tests.
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs
trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs
trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs
Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 20:03:56 UTC (rev 5437)
+++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 20:39:29 UTC (rev 5438)
@@ -60,6 +60,8 @@
RegisterFunction("trim", new AnsiTrimEmulationFunction());
RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))"));
+
+ RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end"));
}
public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection)
Modified: trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs 2011-03-06 20:03:56 UTC (rev 5437)
+++ trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs 2011-03-06 20:39:29 UTC (rev 5438)
@@ -44,6 +44,9 @@
[Test]
public void IntegrityViolation()
{
+ if (Dialect is SQLiteDialect)
+ Assert.Ignore("Example exception converter not implemented.");
+
//ISQLExceptionConverter converter = Dialect.BuildSQLExceptionConverter();
ISQLExceptionConverter converter = sessions.Settings.SqlExceptionConverter;
@@ -107,6 +110,9 @@
[Test]
public void BadGrammar()
{
+ if (Dialect is SQLiteDialect)
+ Assert.Ignore("Example exception converter not implemented.");
+
//ISQLExceptionConverter converter = Dialect.BuildSQLExceptionConverter();
ISQLExceptionConverter converter = sessions.Settings.SqlExceptionConverter;
Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2011-03-06 20:03:56 UTC (rev 5437)
+++ trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2011-03-06 20:39:29 UTC (rev 5438)
@@ -2737,7 +2737,7 @@
IList list;
// disable this for dbs with no subselects
- if (Dialect.SupportsSubSelects)
+ if (Dialect.SupportsSubSelects && TestDialect.SupportsOperatorAll)
{
if (IsClassicParser)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|