|
From: <ric...@us...> - 2009-11-29 20:48:06
|
Revision: 4874
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4874&view=rev
Author: ricbrown
Date: 2009-11-29 20:47:58 +0000 (Sun, 29 Nov 2009)
Log Message:
-----------
Fix NH-2027 (Call Oracle procedures inside packages; using dot notation)
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Engine/Query/CallableParser.cs
trunk/nhibernate/src/NHibernate.Test/EngineTest/CallableParserFixture.cs
Modified: trunk/nhibernate/src/NHibernate/Engine/Query/CallableParser.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Engine/Query/CallableParser.cs 2009-11-29 16:08:44 UTC (rev 4873)
+++ trunk/nhibernate/src/NHibernate/Engine/Query/CallableParser.cs 2009-11-29 20:47:58 UTC (rev 4874)
@@ -16,7 +16,7 @@
public string FunctionName;
}
- private static readonly Regex functionNameFinder = new Regex(@"\{[\S\s]*call[\s]+([\w]+)[^\w]");
+ private static readonly Regex functionNameFinder = new Regex(@"\{[\S\s]*call[\s]+([\w\.]+)[^\w]");
private static readonly int NewLineLength = Environment.NewLine.Length;
public static Detail Parse(string sqlString)
Modified: trunk/nhibernate/src/NHibernate.Test/EngineTest/CallableParserFixture.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/EngineTest/CallableParserFixture.cs 2009-11-29 16:08:44 UTC (rev 4873)
+++ trunk/nhibernate/src/NHibernate.Test/EngineTest/CallableParserFixture.cs 2009-11-29 20:47:58 UTC (rev 4874)
@@ -45,6 +45,15 @@
}
[Test]
+ public void CanFindCallablePackageFunctionName()
+ {
+ string query = @"{ call myPackage.No2_Function(:name) }";
+
+ CallableParser.Detail detail = CallableParser.Parse(query);
+ Assert.That(detail.FunctionName, Is.EqualTo("myPackage.No2_Function"));
+ }
+
+ [Test]
public void CanDetermineHasReturn()
{
string query = @"{ ? = call myFunction(:name) }";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|