You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <te...@us...> - 2009-04-27 18:43:13
|
Revision: 4214 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4214&view=rev Author: tehlike Date: 2009-04-27 18:43:11 +0000 (Mon, 27 Apr 2009) Log Message: ----------- Marking test unignored. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1556/Fixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1556/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1556/Fixture.cs 2009-04-26 19:00:45 UTC (rev 4213) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1556/Fixture.cs 2009-04-27 18:43:11 UTC (rev 4214) @@ -4,7 +4,7 @@ namespace NHibernate.Test.NHSpecificTest.NH1556 { - [TestFixture, Ignore("To investigate")] + [TestFixture] public class Fixture : BugTestCase { // This test not fail but something very strange happen in various others tests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2009-04-26 19:00:56
|
Revision: 4213 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4213&view=rev Author: steverstrong Date: 2009-04-26 19:00:45 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Updated AST parser to handle test cases 1727 & 1742 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/QueryLoader.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ParameterTranslationsImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/QueryLoader.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/QueryLoader.cs 2009-04-24 16:07:40 UTC (rev 4212) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/QueryLoader.cs 2009-04-26 19:00:45 UTC (rev 4213) @@ -61,36 +61,7 @@ protected override void AdjustNamedParameterLocationsForQueryParameters(QueryParameters parameters) { - foreach (int existingParameterLocation in parameters.FilteredParameterLocations) - { - Dictionary<string, int> individualUpdates = new Dictionary<string, int>(); - - foreach (KeyValuePair<string, object> entry in _queryTranslator.NamedParameters) - { - if (entry.Value is int) - { - int namedParameterLocation = (int) entry.Value; - - if (namedParameterLocation == existingParameterLocation) - individualUpdates.Add(entry.Key, namedParameterLocation); - } - else - { - List<int> namedParameterLocations = (List<int>) entry.Value; - - for (int index = 0; index < namedParameterLocations.Count; index++) - { - if (namedParameterLocations[index] == existingParameterLocation) - namedParameterLocations[index]++; - } - } - } - - foreach (KeyValuePair<string, int> entry in individualUpdates) - { - _queryTranslator.NamedParameters[entry.Key] = entry.Value; - } - } + _queryTranslator.AdjustNamedParameterLocationsForQueryParameters(parameters); } protected override SqlString ApplyLocks(SqlString sql, IDictionary<string, LockMode> lockModes, Dialect.Dialect dialect) Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ParameterTranslationsImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ParameterTranslationsImpl.cs 2009-04-24 16:07:40 UTC (rev 4212) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ParameterTranslationsImpl.cs 2009-04-26 19:00:45 UTC (rev 4213) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using NHibernate.Engine; using NHibernate.Hql.Ast.ANTLR.Util; using NHibernate.Type; using NHibernate.Util; @@ -66,6 +67,23 @@ } } + public void AdjustNamedParameterLocationsForQueryParameters(QueryParameters parameters) + { + foreach (int existingParameterLocation in parameters.FilteredParameterLocations) + { + foreach (ParameterInfo entry in _namedParameters.Values) + { + for (int index = 0; index < entry.SqlLocations.Length; index++) + { + if (entry.SqlLocations[index] >= existingParameterLocation) + { + entry.SqlLocations[index]++; + } + } + } + } + } + public int GetOrdinalParameterSqlLocation(int ordinalPosition) { return GetOrdinalParameterInfo(ordinalPosition).SqlLocations[0]; Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs 2009-04-24 16:07:40 UTC (rev 4212) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs 2009-04-26 19:00:45 UTC (rev 4213) @@ -27,7 +27,7 @@ private IDictionary<string, IFilter> _enabledFilters; private readonly ISessionFactoryImplementor _factory; private QueryLoader _queryLoader; - private IParameterTranslations _paramTranslations; + private ParameterTranslationsImpl _paramTranslations; private HqlParseEngine _parser; private HqlSqlTranslator _translator; @@ -180,17 +180,13 @@ return _translator.SqlStatement.Walker.SelectClause.ColumnNames; } - public IDictionary<string, object> NamedParameters - { - get { return _translator.NamedParameters; } - } - public IParameterTranslations GetParameterTranslations() { if (_paramTranslations == null) { _paramTranslations = new ParameterTranslationsImpl(_translator.SqlStatement.Walker.Parameters); } + return _paramTranslations; } @@ -400,6 +396,11 @@ throw new QueryExecutionRequestException("Not supported for DML operations", _hql); } } + + public void AdjustNamedParameterLocationsForQueryParameters(QueryParameters parameters) + { + ((ParameterTranslationsImpl) GetParameterTranslations()).AdjustNamedParameterLocationsForQueryParameters(parameters); + } } public class HqlParseEngine @@ -524,7 +525,6 @@ private readonly QueryTranslatorImpl _qti; private readonly ISessionFactoryImplementor _sfi; private readonly IDictionary<string, string> _tokenReplacements; - private IDictionary<string, object> _namedParameters; private readonly string _collectionRole; private IStatement _resultAst; @@ -548,12 +548,7 @@ get { return _resultAst; } } - public IDictionary<string, object> NamedParameters - { - get { return _namedParameters; } - } - - public IStatement Translate() + public IStatement Translate() { if (_resultAst == null) { @@ -566,8 +561,6 @@ // Transform the tree. _resultAst = (IStatement) hqlSqlWalker.statement().Tree; - _namedParameters = hqlSqlWalker.NamedParameters; - /* if ( AST_LOG.isDebugEnabled() ) { ASTPrinter printer = new ASTPrinter( SqlTokenTypes.class ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-24 16:07:52
|
Revision: 4212 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4212&view=rev Author: fabiomaulo Date: 2009-04-24 16:07:40 +0000 (Fri, 24 Apr 2009) Log Message: ----------- - last available Spring libraries (now signed) - inclusion of Spring stuff in default build Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/lib/net/3.5/Spring.Aop.dll trunk/nhibernate/lib/net/3.5/Spring.Aop.xml trunk/nhibernate/lib/net/3.5/Spring.Core.dll trunk/nhibernate/lib/net/3.5/Spring.Core.xml Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-04-24 06:46:40 UTC (rev 4211) +++ trunk/nhibernate/default.build 2009-04-24 16:07:40 UTC (rev 4212) @@ -30,6 +30,8 @@ <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle/ByteCode.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> + <include name="NHibernate.ByteCode.Spring/ByteCode.build" /> + <include name="NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build" /> <include name="NHibernate.DomainModel/NHibernate.DomainModel.build" /> <include name="NHibernate.Test/NHibernate.Test.build" /> <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" /> @@ -41,6 +43,7 @@ <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" /> <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> + <include name="NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build" /> <include name="NHibernate.Test/NHibernate.Test.build" /> <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" if="${run.performance.tests}" /> Modified: trunk/nhibernate/lib/net/3.5/Spring.Aop.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/3.5/Spring.Aop.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Spring.Aop.xml 2009-04-24 06:46:40 UTC (rev 4211) +++ trunk/nhibernate/lib/net/3.5/Spring.Aop.xml 2009-04-24 16:07:40 UTC (rev 4212) @@ -4,885 +4,1020 @@ <name>Spring.Aop</name> </assembly> <members> - <member name="T:Spring.Aop.Target.AbstractPoolingTargetSource"> + <member name="T:Spring.Aop.Config.AopNamespaceParser"> <summary> - Abstract superclass for pooling <see cref="T:Spring.Aop.ITargetSource"/>s. + Namespace parser for the aop namespace. </summary> <remarks> - <p> - Maintains a pool of target instances, acquiring and releasing a target - object from the pool for each method invocation. - </p> - <p> - This class is independent of pooling technology. - </p> - <p> - Subclasses must implement the - <see cref="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetTarget"/> and - <see cref="M:Spring.Aop.Target.AbstractPoolingTargetSource.ReleaseTarget(System.Object)"/> - methods to work with their chosen pool. The - <see cref="M:Spring.Aop.Target.AbstractPrototypeTargetSource.NewPrototypeInstance"/> - method inherited from the - <see cref="T:Spring.Aop.Target.AbstractPrototypeTargetSource"/> base class - can be used to create objects to put in the pool. Subclasses must also - implement some of the monitoring methods from the - <see cref="T:Spring.Aop.Target.PoolingConfig"/> interface. This class - provides the - <see cref="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetPoolingConfigMixin"/> - method to return an <see cref="T:Spring.Aop.IIntroductionAdvisor"/> - making these statistics available on proxied objects. - </p> - <p> - This class implements the <see cref="T:System.IDisposable"/> interface in - order to force subclasses to implement the - <see cref="M:System.IDisposable.Dispose"/> method to cleanup and close - down their pool. - </p> + Using the <code>advisor</code> tag you can configure an <see cref="T:Spring.Aop.IAdvisor"/> and have it + applied to all the relevant objects in your application context automatically. The + <code>advisor</code> tag supports only referenced <see cref="T:Spring.Aop.IPointcut"/>s. </remarks> + <author>Rob harrop</author> + <author>Adrian Colyer</author> <author>Rod Johnson</author> - <author>Federico Spinazzi (.NET)</author> + <author>Mark Pollack (.NET)</author> </member> - <member name="T:Spring.Aop.Target.AbstractPrototypeTargetSource"> + <member name="M:Spring.Aop.Config.AopNamespaceParser.Init"> <summary> - Base class for dynamic <see cref="T:Spring.Aop.ITargetSource"/> - implementations that can create new prototype object instances to - support a pooling or new-instance-per-invocation strategy. + Register the <see cref="T:Spring.Objects.Factory.Xml.IObjectDefinitionParser"/> for the '<code>config</code>' tag. </summary> - <remarks> - <p> - All such <see cref="T:Spring.Aop.ITargetSource"/>s must run in an - <see cref="T:Spring.Objects.Factory.IObjectFactory"/>, as they need to - call the <see cref="M:Spring.Objects.Factory.IObjectFactory.GetObject(System.String)"/> - method to create a new prototype instance. - </p> - </remarks> - <author>Rod Johnson</author> - <author>Federico Spinazzi (.NET)</author> </member> - <member name="T:Spring.Aop.ITargetSource"> + <member name="T:Spring.Aop.Config.AopNamespaceUtils"> <summary> - Used to obtain the current "target" of an AOP invocation + Utility class for handling registration of auto-proxy creators used internally by the + <code>aop</code> namespace tags. </summary> - <remarks> - <p> - This target will be invoked via reflection if no around advice chooses - to end the interceptor chain itself. - </p> - <p> - If an <see cref="T:Spring.Aop.ITargetSource"/> is <c>"static"</c>, it - will always return the same target, allowing optimizations in the AOP - framework. Dynamic target sources can support pooling, hot swapping etc. - </p> - <p> - Application developers don't usually need to work with target sources - directly: this is an AOP framework interface. - </p> - </remarks> - <author>Rod Johnson</author> - <author>Aleksandar Seovic (.NET)</author> + <author>Rob Harrop</author> + <author>Juergen Hoeller</author> + <author>Mark Pollack (.NET)</author> </member> - <member name="M:Spring.Aop.ITargetSource.GetTarget"> + <member name="F:Spring.Aop.Config.AopNamespaceUtils.AUTO_PROXY_CREATOR_OBJECT_NAME"> <summary> - Returns the target object. + The object name of the internally managed auto-proxy creator. </summary> - <returns>The target object.</returns> - <exception cref="T:System.Exception"> - If unable to obtain the target object. - </exception> </member> - <member name="M:Spring.Aop.ITargetSource.ReleaseTarget(System.Object)"> + <member name="M:Spring.Aop.Config.AopNamespaceUtils.RegisterAutoProxyCreatorIfNecessary(Spring.Objects.Factory.Xml.ParserContext,System.Xml.XmlElement)"> <summary> - Releases the target object. + Registers the auto proxy creator if necessary. </summary> - <param name="target">The target object to release.</param> + <param name="parserContext">The parser context.</param> + <param name="sourceElement">The source element.</param> </member> - <member name="P:Spring.Aop.ITargetSource.TargetType"> + <member name="M:Spring.Aop.Config.AopNamespaceUtils.RegisterApcAsRequired(System.Type,Spring.Objects.Factory.Xml.ParserContext)"> <summary> - The <see cref="T:System.Type"/> of the target object. + Registries the or escalate apc as required. </summary> + <param name="type">The type.</param> + <param name="parserContext">The parser context.</param> </member> - <member name="P:Spring.Aop.ITargetSource.IsStatic"> + <member name="M:Spring.Aop.Config.AopNamespaceUtils.ForceAutoProxyCreatorToUseDecoratorProxy(Spring.Objects.Factory.Support.IObjectDefinitionRegistry)"> <summary> - Is the target source static? + Forces the auto proxy creator to use decorator proxy. </summary> - <value> - <see langword="true"/> if the target source is static. - </value> + <param name="registry">The registry.</param> </member> - <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.#ctor"> + <member name="T:Spring.Aop.Config.ConfigObjectDefinitionParser"> <summary> - Creates a new instance of the - <see cref="T:Spring.Aop.Target.AbstractPrototypeTargetSource"/> - class. + The <see cref="T:Spring.Objects.Factory.Xml.IObjectDefinitionParser"/> for the <code><aop:config></code> tag. </summary> - <remarks> - <p> - This is an <see langword="abstract"/> class, and as such exposes no - public constructors. - </p> - </remarks> + <author>Mark Pollack (.NET)</author> </member> - <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.NewPrototypeInstance"> + <member name="F:Spring.Aop.Config.ConfigObjectDefinitionParser.PROXY_TARGET_TYPE"> <summary> - Subclasses should use this method to create a new prototype instance. + The '<code>proxy-target-type</code>' attribute </summary> </member> - <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.GetTarget"> + <member name="M:Spring.Aop.Config.ConfigObjectDefinitionParser.ParseElement(System.Xml.XmlElement,Spring.Objects.Factory.Xml.ParserContext)"> <summary> - Returns the target object. + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the <see cref="P:Spring.Objects.Factory.Xml.ParserContext.Registry"/> IObjectDefinitionRegistry + embedded in the supplied <see cref="T:Spring.Objects.Factory.Xml.ParserContext"/> </summary> - <returns>The target object.</returns> - <exception cref="T:System.Exception"> - If unable to obtain the target object. - </exception> + <param name="element">The element to be parsed.</param> + <param name="parserContext">The object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry</param> + <returns>The primary object definition.</returns> + <remarks> + <p> + This method is never invoked if the parser is namespace aware + and was called to process the root node. + </p> + </remarks> </member> - <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.ReleaseTarget(System.Object)"> + <member name="M:Spring.Aop.Config.ConfigObjectDefinitionParser.ParseAdvisor(System.Xml.XmlElement,Spring.Objects.Factory.Xml.ParserContext)"> <summary> - Releases the target object. + Parses the supplied advisor element and registers the resulting <see cref="T:Spring.Aop.IAdvisor"/> </summary> - <param name="target">The target object to release.</param> + <param name="advisorElement">The advisor element.</param> + <param name="parserContext">The parser context.</param> </member> - <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.AfterPropertiesSet"> + <member name="T:Spring.Aop.Framework.Adapter.AdvisorAdapterRegistrationManager"> <summary> - Invoked by an <see cref="T:Spring.Objects.Factory.IObjectFactory"/> - after it has set all object properties supplied - (and satisfied the - <see cref="T:Spring.Objects.Factory.IObjectFactoryAware"/> - and <see cref="T:Spring.Context.IApplicationContextAware"/> - interfaces). + <see cref="T:Spring.Objects.Factory.Config.IObjectPostProcessor"/> implementation + that registers instances of any non-default + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> instances with the + <see cref="T:Spring.Aop.Framework.Adapter.GlobalAdvisorAdapterRegistry"/> + singleton. </summary> <remarks> <p> - Ensures that the <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"/> property has been - set to a valid value (i.e. is not <see langword="null"/> or a string - that consists solely of whitespace). + The only requirement for it to work is that it needs to be defined + in an application context along with any arbitrary "non-native" Spring.NET + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> instances that need + to be recognized by Spring.NET's AOP framework. </p> </remarks> - <exception cref="T:System.Exception"> - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - </exception> - <seealso cref="M:Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/> + <author>Dmitriy Kopylenko</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="F:Spring.Aop.Target.AbstractPrototypeTargetSource.logger"> + <member name="M:Spring.Aop.Framework.Adapter.AdvisorAdapterRegistrationManager.PostProcessBeforeInitialization(System.Object,System.String)"> <summary> - The shared <see cref="T:Common.Logging.ILog"/> instance for this class (and derived classes). + Apply this <see cref="T:Spring.Objects.Factory.Config.IObjectPostProcessor"/> + to the given new object instance <i>before</i> any object initialization callbacks. </summary> + <remarks> + <p> + Does nothing, simply returns the supplied <paramref name="instance"/> as is. + </p> + </remarks> + <param name="instance"> + The new object instance. + </param> + <param name="name"> + The name of the object. + </param> + <returns> + The object instance to use, either the original or a wrapped one. + </returns> + <exception cref="T:Spring.Objects.ObjectsException"> + In case of errors. + </exception> </member> - <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"> + <member name="M:Spring.Aop.Framework.Adapter.AdvisorAdapterRegistrationManager.PostProcessAfterInitialization(System.Object,System.String)"> <summary> - The name of the target object to be created on each invocation. + Apply this <see cref="T:Spring.Objects.Factory.Config.IObjectPostProcessor"/> to the + given new object instance <i>after</i> any object initialization callbacks. </summary> <remarks> <p> - This object should be a prototype, or the same instance will always - be obtained from the owning <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.ObjectFactory"/>. + Registers the supplied <paramref name="instance"/> with the + <see cref="T:Spring.Aop.Framework.Adapter.GlobalAdvisorAdapterRegistry"/> + singleton if it is an <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> + instance. </p> </remarks> + <param name="instance"> + The new object instance. + </param> + <param name="objectName"> + The name of the object. + </param> + <returns> + The object instance to use, either the original or a wrapped one. + </returns> + <exception cref="T:Spring.Objects.ObjectsException"> + In case of errors. + </exception> </member> - <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetType"> + <member name="T:Spring.Aop.Framework.Adapter.AfterReturningAdviceAdapter"> <summary> - The <see cref="T:System.Type"/> of the target object. + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> implementation + to enable <see cref="T:Spring.Aop.IAfterReturningAdvice"/> to be used in the + Spring.NET AOP framework. </summary> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.IsStatic"> + <member name="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"> <summary> - Is the target source static? + Permits the handling of new advisors and advice types as extensions to + the Spring AOP framework. </summary> - <value> - <see langword="true"/> if the target source is static. - </value> + <remarks> + <p> + Implementors can create AOP Alliance + <see cref="T:AopAlliance.Intercept.IInterceptor"/>s from custom advice + types, enabling these advice types to be used in the Spring.NET AOP + framework, which uses interception under the covers. + </p> + <p> + There is no need for most Spring.NET users to implement this interface; + do so only if you need to introduce more + <see cref="T:Spring.Aop.IAdvisor"/> or <see cref="T:AopAlliance.Aop.IAdvice"/> + types to Spring.NET. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.ObjectFactory"> + <member name="M:Spring.Aop.Framework.Adapter.IAdvisorAdapter.SupportsAdvice(AopAlliance.Aop.IAdvice)"> <summary> - The target factory that will be used to perform the lookup - of the object referred to by the <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"/> - property. + Does this adapter understand the supplied <paramref name="advice"/>? </summary> <remarks> <p> - Needed so that prototype instances can be created as necessary. + Is it valid to invoke the + <see cref="M:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry.Wrap(System.Object)"/> + method with the given advice as an argument? </p> </remarks> - <value> - The owning <see cref="T:Spring.Objects.Factory.IObjectFactory"/> - (will never be <see langword="null"/>). - </value> - <exception cref="T:Spring.Objects.ObjectsException"> - In case of initialization errors. - </exception> - <seealso cref="P:Spring.Objects.Factory.IObjectFactoryAware.ObjectFactory"/> + <param name="advice"> + <see cref="T:AopAlliance.Aop.IAdvice"/> such as + <see cref="T:Spring.Aop.IBeforeAdvice"/>. + </param> + <returns><see langword="true"/> if this adapter understands the + supplied <paramref name="advice"/>. + </returns> </member> - <member name="T:Spring.Aop.Target.PoolingConfig"> + <member name="M:Spring.Aop.Framework.Adapter.IAdvisorAdapter.GetInterceptor(Spring.Aop.IAdvisor)"> <summary> - Configuration interface for a pooling invoker. + Return an AOP Alliance + <see cref="T:AopAlliance.Intercept.IInterceptor"/> exposing the + behaviour of the given advice to an interception-based AOP + framework. </summary> - <author>Rod Johnson</author> - <author>Aleksandar Seovic (.NET)</author> + <remarks> + <p> + Don't worry about any <see cref="T:Spring.Aop.IPointcut"/> + contained in the supplied <see cref="T:Spring.Aop.IAdvisor"/>; + the AOP framework will take care of checking the pointcut. + </p> + </remarks> + <param name="advisor"> + The advice. The + <see cref="M:Spring.Aop.Framework.Adapter.IAdvisorAdapter.SupportsAdvice(AopAlliance.Aop.IAdvice)"/> + method must have previously returned <see langword="true"/> on the + supplied <paramref name="advisor"/>. + </param> + <returns> + An AOP Alliance + <see cref="T:AopAlliance.Intercept.IInterceptor"/> exposing the + behaviour of the given advice to an interception-based AOP + framework. + </returns> </member> - <member name="P:Spring.Aop.Target.PoolingConfig.Active"> + <member name="M:Spring.Aop.Framework.Adapter.AfterReturningAdviceAdapter.SupportsAdvice(AopAlliance.Aop.IAdvice)"> <summary> - The number of active object instances in a pool. + Returns <see langword="true"/> if the supplied + <paramref name="advice"/> is an instance of the + <see cref="T:Spring.Aop.IAfterReturningAdvice"/> interface. </summary> + <param name="advice">The advice to check.</param> + <returns> + <see langword="true"/> if the supplied <paramref name="advice"/> is + an instance of the <see cref="T:Spring.Aop.IAfterReturningAdvice"/> interface; + <see langword="false"/> if not or if the supplied + <paramref name="advice"/> is <cref lang="null"/>. + </returns> </member> - <member name="P:Spring.Aop.Target.PoolingConfig.Free"> + <member name="M:Spring.Aop.Framework.Adapter.AfterReturningAdviceAdapter.GetInterceptor(Spring.Aop.IAdvisor)"> <summary> - The number of free object instances in a pool. + Wraps the supplied <paramref name="advisor"/>'s + <see cref="P:Spring.Aop.IAdvisor.Advice"/> within a + <see cref="T:Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor"/> + instance. </summary> + <param name="advisor"> + The advisor exposing the <see cref="T:AopAlliance.Aop.IAdvice"/> that + is to be wrapped. + </param> + <returns> + The supplied <paramref name="advisor"/>'s + <see cref="P:Spring.Aop.IAdvisor.Advice"/> wrapped within a + <see cref="T:Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor"/> + instance. + </returns> </member> - <member name="P:Spring.Aop.Target.PoolingConfig.MaxSize"> + <member name="T:Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor"> <summary> - The maximum number of object instances in a pool. + Interceptor to wrap an <see cref="T:Spring.Aop.IAfterReturningAdvice"/> + instance. </summary> + <remarks> + <p> + A more efficient alternative solution in cases where there is no + interception advice and therefore no need to create an + <see cref="T:AopAlliance.Intercept.IMethodInvocation"/> object may be + offered in future. + </p> + <p> + Used internally by the AOP framework: application developers should not need + to use this class directly. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="T:AopAlliance.Aop.IAdvice"> + <member name="T:AopAlliance.Intercept.IMethodInterceptor"> <summary> - Tag interface for advice. + Intercepts calls on an interface on its way to the target. </summary> <remarks> <p> - Implementations can be any type of advice, such as interceptors. + Such interceptions are nested "on top" of the target. </p> </remarks> </member> - <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.#ctor"> + <member name="T:AopAlliance.Intercept.IInterceptor"> <summary> - Creates a new instance of the - <see cref="T:Spring.Aop.Target.AbstractPoolingTargetSource"/> - class. + Represents a generic interceptor. </summary> <remarks> <p> - This is an <see langword="abstract"/> class, and as such exposes no - public constructors. + A generic interceptor can intercept runtime events that occur within a + base program. Those events are materialized by (reified in) joinpoints. + Runtime joinpoints can be invocations, field access, exceptions, etc. </p> + <p> + This interface is not used directly. Use the various derived interfaces + to intercept specific events. + </p> </remarks> + <seealso cref="T:AopAlliance.Intercept.IJoinpoint"/> </member> - <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetTarget"> + <member name="T:AopAlliance.Aop.IAdvice"> <summary> - Returns the target object (acquired from the pool). + Tag interface for advice. </summary> - <returns>The target object (acquired from the pool).</returns> - <exception cref="T:System.Exception"> - If unable to obtain the target object. - </exception> + <remarks> + <p> + Implementations can be any type of advice, such as interceptors. + </p> + </remarks> </member> - <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetPoolingConfigMixin"> + <member name="M:AopAlliance.Intercept.IMethodInterceptor.Invoke(AopAlliance.Intercept.IMethodInvocation)"> <summary> - Gets the <see cref="T:Spring.Aop.Target.PoolingConfig"/> mixin. + Implement this method to perform extra treatments before and after + the call to the supplied <paramref name="invocation"/>. </summary> + <remarks> + <p> + Polite implementations would certainly like to invoke + <see cref="M:AopAlliance.Intercept.IJoinpoint.Proceed"/>. + </p> + </remarks> + <param name="invocation"> + The method invocation that is being intercepted. + </param> <returns> - An <see cref="T:Spring.Aop.IIntroductionAdvisor"/> exposing statistics - about the pool maintained by this object. + The result of the call to the + <see cref="M:AopAlliance.Intercept.IJoinpoint.Proceed"/> method of + the supplied <paramref name="invocation"/>; this return value may + well have been intercepted by the interceptor. </returns> + <exception cref="T:System.Exception"> + If any of the interceptors in the chain or the target object itself + throws an exception. + </exception> </member> - <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.CreatePool(Spring.Objects.Factory.IObjectFactory)"> + <member name="M:Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor.#ctor(Spring.Aop.IAfterReturningAdvice)"> <summary> - Create the pool. + Creates a new instance of the + <see cref="T:Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor"/> + class. </summary> - <param name="factory"> - The owning <see cref="T:Spring.Objects.Factory.IObjectFactory"/>, in - case one needs collaborators from it (normally one's own properties - are sufficient). + <param name="advice"> + The advice to be applied after a target method successfully + returns. </param> - <exception cref="T:System.Exception"> - In the case of errors encountered during the creation of the pool. + <exception cref="T:System.ArgumentNullException"> + If the supplied <paramref name="advice"/> is <see langword="null"/>. </exception> </member> - <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.ReleaseTarget(System.Object)"> + <member name="M:Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor.Invoke(AopAlliance.Intercept.IMethodInvocation)"> <summary> - Releases the target object (returns it to the pool). + Executes interceptor after the target method successfully returns. </summary> - <param name="target"> - The target object to release (return to the pool). + <param name="invocation"> + The method invocation that is being intercepted. </param> + <returns> + The result of the call to the + <see cref="M:AopAlliance.Intercept.IJoinpoint.Proceed"/> method of + the supplied <paramref name="invocation"/>; this return value may + well have been intercepted by the interceptor. + </returns> <exception cref="T:System.Exception"> - In the case that the <paramref name="target"/> could not be released. + If any of the interceptors in the chain or the target object itself + throws an exception. </exception> </member> - <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.Dispose"> + <member name="T:Spring.Aop.Framework.Adapter.BeforeAdviceAdapter"> <summary> - Performs application-defined tasks associated with freeing, releasing, or - resetting unmanaged resources. + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> implementation + to enable <see cref="T:Spring.Aop.IMethodBeforeAdvice"/> to be used in the + Spring.NET AOP framework. </summary> - <remarks> - <p> - Disposes of the pool. - </p> - </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.MaxSize"> + <member name="M:Spring.Aop.Framework.Adapter.BeforeAdviceAdapter.SupportsAdvice(AopAlliance.Aop.IAdvice)"> <summary> - The maximum number of object instances in this pool. + Returns <see langword="true"/> if the supplied + <paramref name="advice"/> is an instance of the + <see cref="T:Spring.Aop.IMethodBeforeAdvice"/> interface. </summary> + <param name="advice">The advice to check.</param> + <returns> + <see langword="true"/> if the supplied <paramref name="advice"/> is + an instance of the <see cref="T:Spring.Aop.IMethodBeforeAdvice"/> interface; + <see langword="false"/> if not or if the supplied + <paramref name="advice"/> is <cref lang="null"/>. + </returns> </member> - <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.Active"> + <member name="M:Spring.Aop.Framework.Adapter.BeforeAdviceAdapter.GetInterceptor(Spring.Aop.IAdvisor)"> <summary> - The number of active object instances in this pool. + Wraps the supplied <paramref name="advisor"/>'s + <see cref="P:Spring.Aop.IAdvisor.Advice"/> within a + <see cref="T:Spring.Aop.Framework.Adapter.MethodBeforeAdviceInterceptor"/> + instance. </summary> + <param name="advisor"> + The advisor exposing the <see cref="T:AopAlliance.Aop.IAdvice"/> that + is to be wrapped. + </param> + <returns> + The supplied <paramref name="advisor"/>'s + <see cref="P:Spring.Aop.IAdvisor.Advice"/> wrapped within a + <see cref="T:Spring.Aop.Framework.Adapter.MethodBeforeAdviceInterceptor"/> + instance. + </returns> </member> - <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.Free"> + <member name="T:Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry"> <summary> - The number of free object instances in this pool. + Default implementation of the + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry"/> + interface. </summary> - </member> - <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.ObjectFactory"> - <summary> - The target factory that will be used to perform the lookup - of the object referred to by the - <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"/> - property. - </summary> - <value> - The owning <see cref="T:Spring.Objects.Factory.IObjectFactory"/> - (will never be <see langword="null"/>). - </value> - <exception cref="T:Spring.Objects.ObjectsException"> - In case of initialization errors. - </exception> - <seealso cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.ObjectFactory"/> - </member> - <member name="T:Spring.Aop.Support.DynamicMethodMatcher"> - <summary> - Convenient abstract superclass for dynamic method matchers that do - care about arguments at runtime. - </summary> <author>Rod Johnson</author> <author>Aleksandar Seovic (.NET)</author> </member> - <member name="T:Spring.Aop.IMethodMatcher"> + <member name="T:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry"> <summary> - That part of an <see cref="T:Spring.Aop.IPointcut"/> that checks whether a - target method is eligible for advice. + A registry of + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> instances. </summary> <remarks> <p> - An <see cref="T:Spring.Aop.IMethodMatcher"/> may be evaluated - <b>statically</b> or at runtime (<b>dynamically</b>). Static - matching involves only the method signature and (possibly) any - <see cref="T:System.Attribute"/>s that have been applied to a method. - Dynamic matching additionally takes into account the actual argument - values passed to a method invocation. + Implementations <b>must</b> also automatically register adapters for + <see cref="T:AopAlliance.Intercept.IInterceptor"/> types. </p> - <p> - If the value of the <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> - property of an implementation instance returns <see langword="false"/>, - evaluation can be performed statically, and the result will be the same - for all invocations of this method, whatever their arguments. This - means that if the value of the - <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> is - <see langword="false"/>, the three argument - <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"/> - method will never be invoked for the lifetime of the - <see cref="T:Spring.Aop.IMethodMatcher"/>. - </p> - <p> - If an implementation returns <see langword="true"/> in its two argument - <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"/> - method, and the value of it's - <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> property is - <see langword="true"/>, the three argument - <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"/> - method will be invoked <i>immediately before each and every potential - execution of the related advice</i>, to decide whether the advice - should run. All previous advice, such as earlier interceptors in an - interceptor chain, will have run, so any state changes they have - produced in parameters or thread local storage, will be available at - the time of evaluation. - </p> + <note> + This is an SPI interface, that should not need to be implemented by any + Spring.NET user. + </note> </remarks> <author>Rod Johnson</author> <author>Aleksandar Seovic (.NET)</author> - <seealso cref="T:Spring.Aop.TrueMethodMatcher"/> </member> - <member name="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"> + <member name="M:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry.Wrap(System.Object)"> <summary> - Does the supplied <paramref name="method"/> satisfy this matcher? + Returns an <see cref="T:Spring.Aop.IAdvisor"/> wrapping the supplied + <paramref name="advice"/>. </summary> - <remarks> - <p> - This is a static check. If this method invocation returns - <see langword="false"/>,or if the - <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> property is - <see langword="false"/>, then no runtime check will be made. - </p> - </remarks> - <param name="method">The candidate method.</param> - <param name="targetType"> - The target <see cref="T:System.Type"/> (may be <see langword="null"/>, - in which case the candidate <see cref="T:System.Type"/> must be taken - to be the <paramref name="method"/>'s declaring class). + <param name="advice"> + The object that should be an advice, such as + <see cref="T:Spring.Aop.IBeforeAdvice"/> or + <see cref="T:Spring.Aop.IThrowsAdvice"/>. </param> - <returns> - <see langword="true"/> if this this method matches statically. + <returns> + An <see cref="T:Spring.Aop.IAdvisor"/> wrapping the supplied + <paramref name="advice"/>. Never returns <cref lang="null"/>. If + the <paramref name="advice"/> parameter is an + <see cref="T:Spring.Aop.IAdvisor"/>, it will simply be returned. </returns> + <exception cref="T:Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"> + If no registered + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> can wrap + the supplied <paramref name="advice"/>. + </exception> </member> - <member name="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"> + <member name="M:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry.GetInterceptor(Spring.Aop.IAdvisor)"> <summary> - Is there a runtime (dynamic) match for the supplied - <paramref name="method"/>? + Returns an <see cref="T:AopAlliance.Intercept.IInterceptor"/> to + allow the use of the supplied <paramref name="advisor"/> in an + interception-based framework. </summary> <remarks> <p> - In order for this method to have even been invoked, the supplied - <paramref name="method"/> must have matched - statically. This method is invoked only if the two argument - <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"/> - method returns <see langword="true"/> for the supplied - <paramref name="method"/> and <paramref name="targetType"/>, and - if the <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> property - is <see langword="true"/>. + Don't worry about the pointcut associated with the + <see cref="T:Spring.Aop.IAdvisor"/>; if it's an + <see cref="T:Spring.Aop.IPointcutAdvisor"/>, just return an + interceptor. </p> - <p> - Invoked immediately <b>before</b> any potential running of the - advice, and <b>after</b> any advice earlier in the advice chain has - run. - </p> </remarks> - <param name="method">The candidate method.</param> - <param name="targetType"> - The target <see cref="T:System.Type"/>. + <param name="advisor"> + The advisor to find an interceptor for. </param> - <param name="args">The arguments to the method</param> <returns> - <see langword="true"/> if there is a runtime match.</returns> + An interceptor to expose this advisor's behaviour. + </returns> + <exception cref="T:Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"> + If the advisor type is not understood by any registered + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/>. + </exception> </member> - <member name="P:Spring.Aop.IMethodMatcher.IsRuntime"> + <member name="M:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry.RegisterAdvisorAdapter(Spring.Aop.Framework.Adapter.IAdvisorAdapter)"> <summary> - Is this <see cref="T:Spring.Aop.IMethodMatcher"/> dynamic? + Register the given <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/>. </summary> <remarks> <p> - If <see langword="true"/>, the three argument - <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"/> - method will be invoked if the two argument - <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"/> - method returns <see langword="true"/>. + Note that it is not necessary to register adapters for + <see cref="T:AopAlliance.Intercept.IInterceptor"/> instances: these + must be automatically recognized by an + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry"/> + implementation. </p> - <p> - Note that this property can be checked when an AOP proxy is created, - and implementations need not check the value of this property again - before each method invocation. - </p> </remarks> - <value> - <see langword="true"/> if this - <see cref="T:Spring.Aop.IMethodMatcher"/> is dynamic. - </value> + <param name="adapter"> + An <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> that + understands the particular advisor and advice types. + </param> </member> - <member name="M:Spring.Aop.Support.DynamicMethodMatcher.#ctor"> + <member name="M:Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry.#ctor"> <summary> Creates a new instance of the - <see cref="T:Spring.Aop.Support.DynamicMethodMatcher"/> - class. + <see cref="T:Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry"/> class. </summary> <remarks> <p> - This is an <see langword="abstract"/> class, and as such exposes no - public constructors. + This constructor will also register the well-known + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> types. </p> </remarks> + <seealso cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> </member> - <member name="M:Spring.Aop.Support.DynamicMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"> + <member name="M:Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry.Wrap(System.Object)"> <summary> - Does the supplied <paramref name="method"/> satisfy this matcher? + Returns an <see cref="T:Spring.Aop.IAdvisor"/> wrapping the supplied + <paramref name="advice"/>. </summary> - <remarks> - <p> - Derived classes can override this method to add preconditions for - dynamic matching. - </p> - <p> - This implementation always returns <see langword="true"/>. - </p> - </remarks> - <param name="method">The candidate method.</param> - <param name="targetType"> - The target <see cref="T:System.Type"/> (may be <see langword="null"/>, - in which case the candidate <see cref="T:System.Type"/> must be taken - to be the <paramref name="method"/>'s declaring class). + <param name="advice"> + The object that should be an advice, such as + <see cref="T:Spring.Aop.IBeforeAdvice"/> or + <see cref="T:Spring.Aop.IThrowsAdvice"/>. </param> + <returns> + An <see cref="T:Spring.Aop.IAdvisor"/> wrapping the supplied + <paramref name="advice"/>. Never returns <cref lang="null"/>. If + the <paramref name="advice"/> parameter is an + <see cref="T:Spring.Aop.IAdvisor"/>, it will simply be returned. + </returns> + <exception cref="T:Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"> + If no registered + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> can wrap + the supplied <paramref name="advice"/>. + </exception> + </member> + <member name="M:Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry.GetInterceptor(Spring.Aop.IAdvisor)"> + <summary> + Returns an <see cref="T:AopAlliance.Intercept.IInterceptor"/> to + allow the use of the supplied <paramref name="advisor"/> in an + interception-based framework. + </summary> + <param name="advisor">The advisor to find an interceptor for.</param> <returns> - <see langword="true"/> if this this method matches statically. + An interceptor to expose this advisor's behaviour. </returns> + <exception cref="T:Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"> + If the advisor type is not understood by any registered + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/>. + </exception> </member> - <member name="M:Spring.Aop.Support.DynamicMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"> + <member name="M:Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry.RegisterAdvisorAdapter(Spring.Aop.Framework.Adapter.IAdvisorAdapter)"> <summary> - Is there a runtime (dynamic) match for the supplied - <paramref name="method"/>? + Register the given <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/>. </summary> - <remarks> - <p> - Must be overriden by derived classes to provide criteria for dynamic matching. - </p> - </remarks> - <param name="method">The candidate method.</param> - <param name="targetType"> - The target <see cref="T:System.Type"/>. + <param name="adapter"> + An <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> that + understands the particular advisor and advice types. </param> - <param name="args">The arguments to the method</param> - <returns> - <see langword="true"/> if there is a runtime match.</returns> </member> - <member name="P:Spring.Aop.Support.DynamicMethodMatcher.IsRuntime"> + <member name="T:Spring.Aop.Framework.Adapter.GlobalAdvisorAdapterRegistry"> <summary> - Is this <see cref="T:Spring.Aop.IMethodMatcher"/> dynamic? + Provides Singleton-style access to the default + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry"/> instance. </summary> - <value> - Always returns <see langword="true"/>, to specify that this is a - dynamic matcher. - </value> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="T:Spring.Aop.Support.ComposablePointcut"> + <member name="M:Spring.Aop.Framework.Adapter.GlobalAdvisorAdapterRegistry.#ctor"> <summary> - Convenient class for building up pointcuts. + Creates a new instance of the + <see cref="T:Spring.Aop.Framework.Adapter.GlobalAdvisorAdapterRegistry"/> class. </summary> <remarks> <p> - All methods return a <see cref="T:Spring.Aop.Support.ComposablePointcut"/> - instance, which facilitates the following concise usage pattern... + This contructor is marked as <see langword="private"/> to enforce the + Singleton pattern </p> - <code language="C#"> - IPointcut pointcut = new ComposablePointcut() - .Union(typeFilter) - .Intersection(methodMatcher) - .Intersection(pointcut); - </code> - <p> - There is no <c>Union()</c> method on this class. Use the - <see cref="M:Spring.Aop.Support.Pointcuts.Union(Spring.Aop.IPointcut,Spring.Aop.IPointcut)"/> method for such functionality. - </p> - </remarks> - <author>Rod Johnson</author> - <author>Aleksandar Seovic (.NET)</author> + </remarks> </member> - <member name="T:Spring.Aop.IPointcut"> + <member name="P:Spring.Aop.Framework.Adapter.GlobalAdvisorAdapterRegistry.Instance"> <summary> - Spring.NET's core pointcut abstraction. + The default <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapterRegistry"/> instance. </summary> + </member> + <member name="T:Spring.Aop.Framework.Adapter.MethodBeforeAdviceInterceptor"> + <summary> + <see cref="T:AopAlliance.Intercept.IInterceptor"/> implementation that + wraps <see cref="T:Spring.Aop.IMethodBeforeAdvice"/> instances. + </summary> <remarks> <p> - A pointcut is composed of <see cref="T:Spring.Aop.ITypeFilter"/>s and - <see cref="T:Spring.Aop.IMethodMatcher"/>s. Both these basic terms and an - <see cref="T:Spring.Aop.IPointcut"/> itself can be combined to build up - sophisticated combinations. + In the future Spring.NET may also offer a more efficient alternative + solution in cases where there is no interception advice and therefore + no need to create an <see cref="T:AopAlliance.Intercept.IMethodInvocation"/> + object. </p> + <p> + Used internally by the Spring.NET AOP framework: application developers + should not need to use this class directly. + </p> </remarks> <author>Rod Johnson</author> <author>Aleksandar Seovic (.NET)</author> </member> - <member name="P:Spring.Aop.IPointcut.TypeFilter"> + <member name="M:Spring.Aop.Framework.Adapter.MethodBeforeAdviceInterceptor.#ctor(Spring.Aop.IMethodBeforeAdvice)"> <summary> - The <see cref="T:Spring.Aop.ITypeFilter"/> for this pointcut. + Creates a new instance of the + <see cref="T:Spring.Aop.Framework.Adapter.MethodBeforeAdviceInterceptor"/> + class. </summary> - <value> - The current <see cref="T:Spring.Aop.ITypeFilter"/>. - </value> + <param name="advice"> + The <see cref="T:Spring.Aop.IMethodBeforeAdvice"/> that is to be wrapped. + </param> + <exception cref="T:System.ArgumentNullException"> + If the supplied <paramref name="advice"/> is <see langword="null"/>. + </exception> </member> - <member name="P:Spring.Aop.IPointcut.MethodMatcher"> + <member name="M:Spring.Aop.Framework.Adapter.MethodBeforeAdviceInterceptor.Invoke(AopAlliance.Intercept.IMethodInvocation)"> <summary> - The <see cref="T:Spring.Aop.IMethodMatcher"/> for this pointcut. + Executes interceptor before the target method successfully returns. </summary> - <value> - The current <see cref="T:Spring.Aop.IMethodMatcher"/>. - </value> + <param name="invocation"> + The method invocation that is being intercepted. + </param> + <returns> + The result of the call to the + <see cref="M:AopAlliance.Intercept.IJoinpoint.Proceed"/> method of + the supplied <paramref name="invocation"/>. + </returns> + <exception cref="T:System.Exception"> + If any of the interceptors in the chain or the target object itself + throws an exception. + </exception> </member> - <member name="M:Spring.Aop.Support.ComposablePointcut.#ctor"> + <member name="T:Spring.Aop.Framework.Adapter.ThrowsAdviceAdapter"> <summary> - Creates a new instance of the - <see cref="T:Spring.Aop.Support.ComposablePointcut"/> class - that matches all the methods on all <see cref="T:System.Type"/>s. + <see cref="T:Spring.Aop.Framework.Adapter.IAdvisorAdapter"/> implementation + to enable <see cref="T:Spring.Aop.IThrowsAdvice"/> to be used in the + Spring.NET AOP framework. </summary> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> </member> - <member name="M:Spring.Aop.Support.ComposablePointcut.#ctor(Spring.Aop.ITypeFilter,Spring.Aop.IMethodMatcher)"> + <member name="M:Spring.Aop.Framework.Adapter.ThrowsAdviceAdapter.SupportsAdvice(AopAlliance.Aop.IAdvice)"> <summary> - Creates a new instance of the - <see cref="T:Spring.Aop.Support.ComposablePointcut"/> class - that uses the supplied <paramref name="typeFilter"/> and - <paramref name="methodMatcher"/>. + Returns <see langword="true"/> if the supplied + <paramref name="advice"/> is an instance of the + <see cref="T:Spring.Aop.IThrowsAdvice"/> interface. </summary> - <param name="typeFilter"> - The type filter to use. - </param> - <param name="methodMatcher"> - The method matcher to use. - </param> + <param name="advice">The advice to check.</param> + <returns> + <see langword="true"/> if the supplied <paramref name="advice"/> is + an instance of the <see cref="T:Spring.Aop.IThrowsAdvice"/> interface; + <see langword="false"/> if not or if the supplied + <paramref name="advice"/> is <cref lang="null"/>. + </returns> </member> - <member name="M:Spring.Aop.Support.ComposablePointcut.Union(Spring.Aop.ITypeFilter)"> + <member name="M:Spring.Aop.Framework.Adapter.ThrowsAdviceAdapter.GetInterceptor(Spring.Aop.IAdvisor)"> <summary> - Changes the current type filter to be the union of the existing filter and the - supplied <paramref name="filter"/>. + Wraps the supplied <paramref name="advisor"/>'s + <see cref="P:Spring.Aop.IAdvisor.Advice"/> within a + <see cref="T:Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptor"/> + instance. </summary> - <param name="filter">The filter to union with.</param> + <param name="advisor"> + The advisor exposing the <see cref="T:AopAlliance.Aop.IAdvice"/> that + is to be wrapped. + </param> <returns> - The union of the existing filter and the supplied <paramref name="filter"/>. + The supplied <paramref name="advisor"/>'s + <see cref="P:Spring.Aop.IAdvisor.Advice"/> wrapped within a + <see cref="T:Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptor"/> + instance. </returns> </member> - <member name="M:Spring.Aop.Support.ComposablePointcut.Intersection(Spring.Aop.ITypeFilter)"> + <member name="T:Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptor"> + <summary>Interceptor to wrap an after throwing advice.</summary> + <remarks> + <p> + Implementations of the <see cref="T:Spring.Aop.IThrowsAdvice"/> interface + <b>must</b> define methods of the form... + <code lang="C#"> + AfterThrowing([MethodInfo method, Object[] args, Object target], Exception subclass); + </code> + The method name is fixed (i.e. your methods <b>must</b> be named + <c>AfterThrowing</c>. The first three arguments (<i>as a whole</i>) are + optional, and only useful if futher information about the joinpoint is + required. The return type <i>can</i> be anything, but is almost always + <see langword="void"/> by convention. + </p> + <p> + Please note that the object encapsulating the throws advice does not + need to implement the <see cref="T:S... [truncated message content] |
From: <fab...@us...> - 2009-04-24 06:46:42
|
Revision: 4211 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4211&view=rev Author: fabiomaulo Date: 2009-04-24 06:46:40 +0000 (Fri, 24 Apr 2009) Log Message: ----------- Fix with the same fix of NH-1742 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Model.cs Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Fixture.cs 2009-04-24 06:46:40 UTC (rev 4211) @@ -0,0 +1,76 @@ +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1727 +{ + [TestFixture] + public class Fixture : BugTestCase + { + /* To the commiter + * I'm using sql2005dialect + * From what I've read there's been some diffucalties with this + * dialect before when used parameter queries. + * The first test (xxx_DoesNotWorkToday) passed in NH 2.0 + * The second test passes where I've just switched the order in the where clause + */ + + + [Test] + public void VerifyFilterAndInAndProperty_DoesNotWorkToday() + { + const string hql = @"select a from ClassA a + where a.Value in (:aValues) + and a.Name=:name"; + ClassB b = new ClassB(); + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.Save(b); + t.Commit(); + } + using (ISession s = OpenSession()) + { + s.EnableFilter("bEquals").SetParameter("b", b.Id); + s.CreateQuery(hql) + .SetString("name", "Sweden") + .SetParameterList("aValues", new[] { 1, 3, 4 }) + .List<ClassA>(); + } + } + + + [Test] + public void VerifyFilterAndInAndProperty_WorksToday() + { + const string hql = @"select a from ClassA a + where a.Name=:name + and a.Value in (:aValues)"; + ClassB b = new ClassB(); + using(ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.Save(b); + t.Commit(); + } + using(ISession s = OpenSession()) + { + s.EnableFilter("bEquals").SetParameter("b", b.Id); + s.CreateQuery(hql) + .SetString("name", "Sweden") + .SetParameterList("aValues", new []{1,3,4}) + .List<ClassA>(); + } + } + + protected override void OnTearDown() + { + using(ISession s = OpenSession()) + using(ITransaction t = s.BeginTransaction()) + { + s.Delete("from ClassB"); + s.Delete("from ClassA"); + t.Commit(); + } + } + + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Mappings.hbm.xml 2009-04-24 06:46:40 UTC (rev 4211) @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH1727" + assembly="NHibernate.Test"> + <class name="ClassA"> + <id name="Id"> + <generator class="guid.comb"/> + </id> + <bag name="BCollection"> + <key column="classA"/> + <one-to-many class="ClassB"/> + </bag> + <many-to-one name="B" + class="ClassB"/> + + <property name="Name"/> + <property name="Value" /> + + <filter name="bEquals" + condition=":b = B"/> + </class> + + <class name="ClassB"> + <id name="Id"> + <generator class="guid.comb"/> + </id> + </class> + + <filter-def name="bEquals"> + <filter-param name="b" + type="guid"/> + </filter-def> +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1727/Model.cs 2009-04-24 06:46:40 UTC (rev 4211) @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace NHibernate.Test.NHSpecificTest.NH1727 +{ + public class ClassA + { + public virtual Guid Id { get; set; } + public virtual IList<ClassB> BCollection { get; set; } + public virtual string Name { get; set; } + public virtual int Value { get; set; } + public virtual ClassB B {get;set;} + } + + public class ClassB + { + public virtual Guid Id { get; set; } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-24 06:40:17 UTC (rev 4210) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-24 06:46:40 UTC (rev 4211) @@ -324,6 +324,8 @@ <Compile Include="NHSpecificTest\NH1715\ClassA.cs" /> <Compile Include="NHSpecificTest\NH1716\ClassA.cs" /> <Compile Include="NHSpecificTest\NH1716\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1727\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1727\Model.cs" /> <Compile Include="NHSpecificTest\NH1741\Domain.cs" /> <Compile Include="NHSpecificTest\NH1741\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1742\DomainClass.cs" /> @@ -1721,6 +1723,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1727\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1742\Mappings.hbm.xml" /> <EmbeddedResource Include="HQL\Ast\SimpleClass.hbm.xml" /> <EmbeddedResource Include="HQL\Ast\TestQueries.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-24 06:40:22
|
Revision: 4210 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4210&view=rev Author: fabiomaulo Date: 2009-04-24 06:40:17 +0000 (Fri, 24 Apr 2009) Log Message: ----------- Fix NH-1742 by Richard Brown Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/DomainClass.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Mappings.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs 2009-04-24 06:17:30 UTC (rev 4209) +++ trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs 2009-04-24 06:40:17 UTC (rev 4210) @@ -713,7 +713,7 @@ { for (int index = 0; index < namedParameterLocations.Count; index++) { - if (namedParameterLocations[index] == existingParameterLocation) + if (namedParameterLocations[index] >= existingParameterLocation) namedParameterLocations[index]++; } } Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/DomainClass.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/DomainClass.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/DomainClass.cs 2009-04-24 06:40:17 UTC (rev 4210) @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace NHibernate.Test.NHSpecificTest.NH1742 +{ + public class Event + { + private readonly IList<Description> descriptions = new List<Description>(); + + public virtual IList<Description> Descriptions + { + get { return descriptions; } + } + + public virtual int ID { get; set; } + public virtual Device SendedBy { get; set; } + public virtual DateTime Date { get; set; } + } + + public class Device + { + public virtual int ID { get; set; } + } + + public class Description + { + public virtual Event Event { get; set; } + public virtual int ID { get; set; } + public virtual string LanguageID { get; set; } + public virtual string Value { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Fixture.cs 2009-04-24 06:40:17 UTC (rev 4210) @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using NHibernate.Dialect; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1742 +{ + [TestFixture] + public class Fixture : BugTestCase + { + private ISession session; + private ITransaction transaction; + private Device device; + private DateTime date = new DateTime(2000, 1, 1); + + protected override void OnSetUp() + { + base.OnSetUp(); + + session = OpenSession(); + transaction = session.BeginTransaction(); + + device = new Device(); + session.Save(device); + + var ev = new Event {Date = date, SendedBy = device}; + session.Save(ev); + + var d = new Description {Event = ev, Value = "Test", LanguageID = "it"}; + session.Save(d); + + IFilter f = session.EnableFilter("LanguageFilter").SetParameter("LanguageID", "it"); + + f.Validate(); + } + + protected override void OnTearDown() + { + transaction.Rollback(); + session.Close(); + + base.OnTearDown(); + } + + protected override bool AppliesTo(Dialect.Dialect dialect) + { + return dialect as MsSql2000Dialect != null; + } + + [Test] + public void BugTest() + { + IQuery query = + session.CreateQuery("SELECT e FROM Event e " + " inner join fetch e.descriptions d " + + " WHERE (e.SendedBy in( :dev)) " + " AND (e.Date >= :from) " + " AND (e.Date <= :to)" + + " ORDER BY d.Value"); + + var devices = new List<Device> {device}; + + query.SetParameterList("dev", devices).SetDateTime("from", date).SetDateTime("to", date.AddMonths(1)); + + Assert.AreEqual(1, query.List<Event>().Count); + } + + [Test] + public void WorkingTest() + { + IQuery query = + session.CreateQuery("SELECT e FROM Event e " + " inner join fetch e.descriptions d " + " WHERE (e.Date >= :from) " + + " AND (e.Date <= :to)" + " AND (e.SendedBy in( :dev)) " + " ORDER BY d.Value"); + + var devices = new List<Device> {device}; + + query.SetParameterList("dev", devices).SetDateTime("from", date).SetDateTime("to", date.AddMonths(1)); + + Assert.AreEqual(1, query.List<Event>().Count); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1742/Mappings.hbm.xml 2009-04-24 06:40:17 UTC (rev 4210) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH1742" + default-lazy="false"> + + <class name="Event" table="tblEventi" > + <id name="ID" column="ID"> + <generator class="identity" /> + </id> + <many-to-one name="SendedBy" column="IDStrumento" class="Device" + access="property" /> + <property name="Date" column="Data"/> + <bag name="descriptions" lazy="false" access="field" inverse="true" cascade="none" > + <key column="IDEvento" /> + <one-to-many class="Description" /> + <filter name="LanguageFilter" condition=":LanguageID = IDLingua"/> + </bag> + </class> + + <class name="Device" table="tblStrumenti"> + <id name="ID" column="ID" type="Int32" unsaved-value="0"> + <generator class="identity" /> + </id> + </class> + + <class name="Description" table="tblDescrizioni"> + <id name="ID" column="ID"> + <generator class="identity" /> + </id> + <many-to-one name="Event" column="IDEvento" class="Event" + access="property" /> + <property name="Value" column="Descrizione"/> + <property name="LanguageID" column="IDLingua"/> + <filter name="LanguageFilter" condition=":LanguageID = IDLingua"/> + </class> + + <filter-def name="LanguageFilter"> + <filter-param name="LanguageID" type="String"/> + </filter-def> + +</hibernate-mapping> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-24 06:17:30 UTC (rev 4209) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-24 06:40:17 UTC (rev 4210) @@ -326,6 +326,8 @@ <Compile Include="NHSpecificTest\NH1716\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1741\Domain.cs" /> <Compile Include="NHSpecificTest\NH1741\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1742\DomainClass.cs" /> + <Compile Include="NHSpecificTest\NH1742\Fixture.cs" /> <Compile Include="NHSpecificTest\NH645\HQLFunctionFixture.cs" /> <Compile Include="HQL\HQLFunctions.cs" /> <Compile Include="HQL\Human.cs" /> @@ -1719,6 +1721,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1742\Mappings.hbm.xml" /> <EmbeddedResource Include="HQL\Ast\SimpleClass.hbm.xml" /> <EmbeddedResource Include="HQL\Ast\TestQueries.xml" /> <EmbeddedResource Include="HQL\Ast\TestQueriesWithResults.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-24 06:17:32
|
Revision: 4209 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4209&view=rev Author: fabiomaulo Date: 2009-04-24 06:17:30 +0000 (Fri, 24 Apr 2009) Log Message: ----------- - Minor (reformatting) - Added methods to apply a test for a specific QueryTranslator Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs trunk/nhibernate/src/NHibernate.Test/TestCase.cs Modified: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs 2009-04-23 20:31:58 UTC (rev 4208) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs 2009-04-24 06:17:30 UTC (rev 4209) @@ -2,7 +2,6 @@ using NHibernate.Hql.Ast.ANTLR; using System.Collections.Generic; using NHibernate.Util; -using NUnit.Framework; namespace NHibernate.Test.HQL.Ast { @@ -10,12 +9,9 @@ { private readonly IDictionary<string, IFilter> emptyfilters = new CollectionHelper.EmptyMapClass<string, IFilter>(); - protected override void OnSetUp() + protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) { - if (!(sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory)) - { - Assert.Ignore("ASTQueryTranslator specific test"); - } + return sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory; } #region Overrides of TestCase Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2009-04-23 20:31:58 UTC (rev 4208) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2009-04-24 06:17:30 UTC (rev 4209) @@ -514,19 +514,20 @@ { if (!(Dialect is FirebirdDialect)) { - if (IsClassicParser) - { - list = - s.CreateQuery("from foo in class NHibernate.DomainModel.Foo where ? = some foo.Component.ImportantDates.elements") - .SetDateTime(0, DateTime.Today).List(); - - } - else - { - list = - s.CreateQuery("from foo in class NHibernate.DomainModel.Foo where ? = some elements(foo.Component.ImportantDates)") - .SetDateTime(0, DateTime.Today).List(); - } + if (IsClassicParser) + { + list = + s.CreateQuery("from foo in class NHibernate.DomainModel.Foo where ? = some foo.Component.ImportantDates.elements") + .SetDateTime(0, DateTime.Today).List(); + + } + else + { + list = + s.CreateQuery( + "from foo in class NHibernate.DomainModel.Foo where ? = some elements(foo.Component.ImportantDates)"). + SetDateTime(0, DateTime.Today).List(); + } Assert.AreEqual(2, list.Count, "component query"); } @@ -601,18 +602,19 @@ IsEmpty(s.CreateQuery("from bar in class Bar where bar.String='a string' or bar.String='a string'").Enumerable() )); - if (IsClassicParser) - { - enumerable = s.CreateQuery( - "select foo.Component.Name, foo.Component.ImportantDates.elements from foo in class Foo where foo.TheFoo.id=?" - ).SetString(0, foo.TheFoo.Key).Enumerable(); - } - else - { - enumerable = s.CreateQuery( - "select foo.Component.Name, elements(foo.Component.ImportantDates) from foo in class Foo where foo.TheFoo.id=?" - ).SetString(0, foo.TheFoo.Key).Enumerable(); - } + if (IsClassicParser) + { + enumerable = s.CreateQuery( + "select foo.Component.Name, foo.Component.ImportantDates.elements from foo in class Foo where foo.TheFoo.id=?" + ).SetString(0, foo.TheFoo.Key).Enumerable(); + } + else + { + enumerable = + s.CreateQuery( + "select foo.Component.Name, elements(foo.Component.ImportantDates) from foo in class Foo where foo.TheFoo.id=?"). + SetString(0, foo.TheFoo.Key).Enumerable(); + } int i = 0; foreach (object[] row in enumerable) @@ -623,18 +625,18 @@ } Assert.AreEqual(3, i); //WAS: 4 - if (IsClassicParser) - { - enumerable = s.CreateQuery( - "select max(foo.Component.ImportantDates.elements) from foo in class Foo group by foo.id" - ).Enumerable(); - } - else - { - enumerable = s.CreateQuery( - "select max(elements(foo.Component.ImportantDates)) from foo in class Foo group by foo.id" - ).Enumerable(); - } + if (IsClassicParser) + { + enumerable = s.CreateQuery( + "select max(foo.Component.ImportantDates.elements) from foo in class Foo group by foo.id" + ).Enumerable(); + } + else + { + enumerable = + s.CreateQuery("select max(elements(foo.Component.ImportantDates)) from foo in class Foo group by foo.id"). + Enumerable(); + } IEnumerator enumerator = enumerable.GetEnumerator(); Assert.IsTrue(enumerator.MoveNext()); @@ -838,18 +840,18 @@ "from Baz baz where 'a' in elements(baz.CollectionComponent.Nested.Foos) and 1.0 in elements(baz.CollectionComponent.Nested.Floats)") .List(); - if (IsClassicParser) - { - s.CreateQuery( - "from Baz baz where 'b' in baz.CollectionComponent.Nested.Foos.elements and 1.0 in baz.CollectionComponent.Nested.Floats.elements") - .List(); - } - else - { - s.CreateQuery( - "from Baz baz where 'b' in elements(baz.CollectionComponent.Nested.Foos) and 1.0 in elements(baz.CollectionComponent.Nested.Floats)") - .List(); - } + if (IsClassicParser) + { + s.CreateQuery( + "from Baz baz where 'b' in baz.CollectionComponent.Nested.Foos.elements and 1.0 in baz.CollectionComponent.Nested.Floats.elements") + .List(); + } + else + { + s.CreateQuery( + "from Baz baz where 'b' in elements(baz.CollectionComponent.Nested.Foos) and 1.0 in elements(baz.CollectionComponent.Nested.Floats)") + .List(); + } } s.CreateQuery("from Foo foo join foo.TheFoo where foo.TheFoo in ('1','2','3')").List(); @@ -2441,16 +2443,10 @@ s.CreateQuery(hql).List(); } - if (IsClassicParser) - { - hql = "select fum1.Friends.elements from fum1 in class Fum"; - } - else - { - hql = "select elements(fum1.Friends) from fum1 in class Fum"; - } - s.CreateQuery(hql).List(); + hql = IsClassicParser ? "select fum1.Friends.elements from fum1 in class Fum" : "select elements(fum1.Friends) from fum1 in class Fum"; + s.CreateQuery(hql).List(); + hql = "from fum1 in class Fum, fr in elements( fum1.Friends )"; s.CreateQuery(hql).List(); @@ -2579,14 +2575,14 @@ Assert.AreEqual(1, s.CreateQuery("from Bar bar join bar.Baz.FooArray foo").List().Count); - if (IsClassicParser) - { - Assert.AreEqual(0, s.CreateQuery("from bar in class Bar, foo in bar.Baz.FooSet.elements").List().Count); - } - else - { - Assert.AreEqual(0, s.CreateQuery("from bar in class Bar, foo in elements(bar.Baz.FooSet)").List().Count); - } + if (IsClassicParser) + { + Assert.AreEqual(0, s.CreateQuery("from bar in class Bar, foo in bar.Baz.FooSet.elements").List().Count); + } + else + { + Assert.AreEqual(0, s.CreateQuery("from bar in class Bar, foo in elements(bar.Baz.FooSet)").List().Count); + } Assert.AreEqual(1, s.CreateQuery("from bar in class Bar, foo in elements( bar.Baz.FooArray )").List().Count); @@ -2615,14 +2611,10 @@ Assert.IsTrue(enumer.MoveNext()); Assert.AreSame(baz, enumer.Current); - if (IsClassicParser) - { - enumer = s.CreateQuery("select baz.StringArray.elements from baz in class Baz").Enumerable().GetEnumerator(); - } - else - { - enumer = s.CreateQuery("select elements(baz.StringArray) from baz in class Baz").Enumerable().GetEnumerator(); - } + enumer = IsClassicParser + ? s.CreateQuery("select baz.StringArray.elements from baz in class Baz").Enumerable().GetEnumerator() + : s.CreateQuery("select elements(baz.StringArray) from baz in class Baz").Enumerable().GetEnumerator(); + bool found = false; while (enumer.MoveNext()) { @@ -2635,28 +2627,21 @@ baz.StringArray = null; s.CreateQuery("from baz in class Baz").Enumerable(); // no flush - if (IsClassicParser) - { - enumer = s.CreateQuery("select baz.StringArray.elements from baz in class Baz").Enumerable().GetEnumerator(); - } - else - { - enumer = s.CreateQuery("select elements(baz.StringArray) from baz in class Baz").Enumerable().GetEnumerator(); - } + + enumer = IsClassicParser + ? s.CreateQuery("select baz.StringArray.elements from baz in class Baz").Enumerable().GetEnumerator() + : s.CreateQuery("select elements(baz.StringArray) from baz in class Baz").Enumerable().GetEnumerator(); + Assert.IsFalse(enumer.MoveNext()); baz.StringList.Add("1E1"); enumer = s.CreateQuery("from foo in class Foo").Enumerable().GetEnumerator(); // no flush Assert.IsFalse(enumer.MoveNext()); - if (IsClassicParser) - { - enumer = s.CreateQuery("select baz.StringList.elements from baz in class Baz").Enumerable().GetEnumerator(); - } - else - { - enumer = s.CreateQuery("select elements(baz.StringList) from baz in class Baz").Enumerable().GetEnumerator(); - } + enumer = IsClassicParser + ? s.CreateQuery("select baz.StringList.elements from baz in class Baz").Enumerable().GetEnumerator() + : s.CreateQuery("select elements(baz.StringList) from baz in class Baz").Enumerable().GetEnumerator(); + found = false; while (enumer.MoveNext()) { @@ -2668,23 +2653,19 @@ Assert.IsTrue(found); baz.StringList.Remove("1E1"); - if (IsClassicParser) - { - s.CreateQuery("select baz.StringArray.elements from baz in class Baz").Enumerable(); //no flush - } - else - { - s.CreateQuery("select elements(baz.StringArray) from baz in class Baz").Enumerable(); //no flush - } + if (IsClassicParser) + { + s.CreateQuery("select baz.StringArray.elements from baz in class Baz").Enumerable(); //no flush + } + else + { + s.CreateQuery("select elements(baz.StringArray) from baz in class Baz").Enumerable(); //no flush + } - if (IsClassicParser) - { - enumer = s.CreateQuery("select baz.StringList.elements from baz in class Baz").Enumerable().GetEnumerator(); - } - else - { - enumer = s.CreateQuery("select elements(baz.StringList) from baz in class Baz").Enumerable().GetEnumerator(); - } + enumer = IsClassicParser + ? s.CreateQuery("select baz.StringList.elements from baz in class Baz").Enumerable().GetEnumerator() + : s.CreateQuery("select elements(baz.StringList) from baz in class Baz").Enumerable().GetEnumerator(); + found = false; while (enumer.MoveNext()) { @@ -2702,14 +2683,11 @@ s.CreateQuery("from foo in class Foo").Enumerable().GetEnumerator(); //no flush baz.StringList = null; - if (IsClassicParser) - { - enumer = s.CreateQuery("select baz.StringList.elements from baz in class Baz").Enumerable().GetEnumerator(); - } - else - { - enumer = s.CreateQuery("select elements(baz.StringList) from baz in class Baz").Enumerable().GetEnumerator(); - } + + enumer = IsClassicParser + ? s.CreateQuery("select baz.StringList.elements from baz in class Baz").Enumerable().GetEnumerator() + : s.CreateQuery("select elements(baz.StringList) from baz in class Baz").Enumerable().GetEnumerator(); + Assert.IsFalse(enumer.MoveNext()); s.Delete(baz); @@ -2764,20 +2742,20 @@ // disable this for dbs with no subselects if (Dialect.SupportsSubSelects) { - if (IsClassicParser) - { - list = - s.CreateQuery( - "select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in baz.FooArray.elements and 3 = some baz.IntArray.elements and 4 > all baz.IntArray.indices") - .List(); - } - else - { - list = - s.CreateQuery( - "select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in elements(baz.FooArray) and 3 = some elements(baz.IntArray) and 4 > all indices(baz.IntArray)") - .List(); - } + if (IsClassicParser) + { + list = + s.CreateQuery( + "select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in baz.FooArray.elements and 3 = some baz.IntArray.elements and 4 > all baz.IntArray.indices") + .List(); + } + else + { + list = + s.CreateQuery( + "select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in elements(baz.FooArray) and 3 = some elements(baz.IntArray) and 4 > all indices(baz.IntArray)") + .List(); + } Assert.AreEqual(2, list.Count, "collection.elements find"); } @@ -2785,29 +2763,25 @@ // sapdb doesn't like distinct with binary type //if( !(dialect is Dialect.SAPDBDialect) ) //{ - if (IsClassicParser) - { - list = - s.CreateQuery("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements").List - (); - } - else - { - list = - s.CreateQuery("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)").List - (); - } + if (IsClassicParser) + { + list = + s.CreateQuery("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements").List + (); + } + else + { + list = + s.CreateQuery("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)"). + List(); + } Assert.AreEqual(2, list.Count, "collection.elements find"); //} - if (IsClassicParser) - { - list = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooSet.elements").List(); - } - else - { - list = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooSet)").List(); - } + list = IsClassicParser + ? s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooSet.elements").List() + : s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooSet)").List(); + Assert.AreEqual(1, list.Count, "association.elements find"); txn.Commit(); @@ -5022,20 +4996,20 @@ baz = (Baz) s.Load(typeof(Baz), baz.Code); baz.StringArray[0] = "bark"; - IEnumerator e; + IEnumerator e; - if (IsClassicParser) - { - e = s.CreateQuery("select baz.StringArray.elements from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } - else - { - e = s.CreateQuery("select elements(baz.StringArray) from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } + if (IsClassicParser) + { + e = + s.CreateQuery("select baz.StringArray.elements from baz in class NHibernate.DomainModel.Baz").Enumerable(). + GetEnumerator(); + } + else + { + e = + s.CreateQuery("select elements(baz.StringArray) from baz in class NHibernate.DomainModel.Baz").Enumerable(). + GetEnumerator(); + } bool found = false; while (e.MoveNext()) @@ -5048,33 +5022,33 @@ Assert.IsTrue(found); baz.StringArray = null; - if (IsClassicParser) - { - e = s.CreateQuery("select distinct baz.StringArray.elements from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } - else - { - e = s.CreateQuery("select distinct elements(baz.StringArray) from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } + if (IsClassicParser) + { + e = s.CreateQuery("select distinct baz.StringArray.elements from baz in class NHibernate.DomainModel.Baz") + .Enumerable() + .GetEnumerator(); + } + else + { + e = + s.CreateQuery("select distinct elements(baz.StringArray) from baz in class NHibernate.DomainModel.Baz").Enumerable() + .GetEnumerator(); + } Assert.IsFalse(e.MoveNext()); baz.StringArray = new string[] {"foo", "bar"}; - if (IsClassicParser) - { - e = s.CreateQuery("select baz.StringArray.elements from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } - else - { - e = s.CreateQuery("select elements(baz.StringArray) from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } + if (IsClassicParser) + { + e = s.CreateQuery("select baz.StringArray.elements from baz in class NHibernate.DomainModel.Baz") + .Enumerable() + .GetEnumerator(); + } + else + { + e = + s.CreateQuery("select elements(baz.StringArray) from baz in class NHibernate.DomainModel.Baz").Enumerable(). + GetEnumerator(); + } Assert.IsTrue(e.MoveNext()); Foo foo = new Foo(); @@ -5082,18 +5056,18 @@ s.Flush(); baz.FooArray = new Foo[] {foo}; - if (IsClassicParser) - { - e = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements") - .Enumerable() - .GetEnumerator(); - } - else - { - e = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)") - .Enumerable() - .GetEnumerator(); - } + if (IsClassicParser) + { + e = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements") + .Enumerable() + .GetEnumerator(); + } + else + { + e = + s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)").Enumerable() + .GetEnumerator(); + } found = false; while (e.MoveNext()) { @@ -5106,61 +5080,66 @@ baz.FooArray[0] = null; - if (IsClassicParser) - { - e = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements") - .Enumerable() - .GetEnumerator(); - } - else - { - e = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)") - .Enumerable() - .GetEnumerator(); - } + if (IsClassicParser) + { + e = s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements") + .Enumerable() + .GetEnumerator(); + } + else + { + e = + s.CreateQuery("select foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)").Enumerable() + .GetEnumerator(); + } Assert.IsFalse(e.MoveNext()); baz.FooArray[0] = foo; - if (IsClassicParser) - { - e = s.CreateQuery("select baz.FooArray.elements from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } - else - { - e = s.CreateQuery("select elements(baz.FooArray) from baz in class NHibernate.DomainModel.Baz") - .Enumerable() - .GetEnumerator(); - } + if (IsClassicParser) + { + e = s.CreateQuery("select baz.FooArray.elements from baz in class NHibernate.DomainModel.Baz") + .Enumerable() + .GetEnumerator(); + } + else + { + e = + s.CreateQuery("select elements(baz.FooArray) from baz in class NHibernate.DomainModel.Baz").Enumerable(). + GetEnumerator(); + } Assert.IsTrue(e.MoveNext()); if (Dialect.SupportsSubSelects && !(Dialect is FirebirdDialect)) { baz.FooArray[0] = null; - if (IsClassicParser) - { - e = s.CreateQuery("from baz in class NHibernate.DomainModel.Baz where ? in baz.FooArray.elements") - .SetEntity(0, foo).Enumerable().GetEnumerator(); - } - else - { - e = s.CreateQuery("from baz in class NHibernate.DomainModel.Baz where ? in elements(baz.FooArray)") - .SetEntity(0, foo).Enumerable().GetEnumerator(); - } + if (IsClassicParser) + { + e = s.CreateQuery("from baz in class NHibernate.DomainModel.Baz where ? in baz.FooArray.elements") + .SetEntity(0, foo).Enumerable().GetEnumerator(); + } + else + { + e = + s.CreateQuery("from baz in class NHibernate.DomainModel.Baz where ? in elements(baz.FooArray)").SetEntity(0, foo). + Enumerable().GetEnumerator(); + } Assert.IsFalse(e.MoveNext()); baz.FooArray[0] = foo; - if (IsClassicParser) - { - e = s.CreateQuery("select foo from foo in class NHibernate.DomainModel.Foo where foo in " - + "(select elt from baz in class NHibernate.DomainModel.Baz, elt in baz.FooArray.elements)").Enumerable().GetEnumerator(); - } - else - { - e = s.CreateQuery("select foo from foo in class NHibernate.DomainModel.Foo where foo in " - + "(select elt from baz in class NHibernate.DomainModel.Baz, elt in elements(baz.FooArray))").Enumerable().GetEnumerator(); - } + if (IsClassicParser) + { + e = + s.CreateQuery("select foo from foo in class NHibernate.DomainModel.Foo where foo in " + + "(select elt from baz in class NHibernate.DomainModel.Baz, elt in baz.FooArray.elements)"). + Enumerable().GetEnumerator(); + } + else + { + e = + s.CreateQuery("select foo from foo in class NHibernate.DomainModel.Foo where foo in " + + "(select elt from baz in class NHibernate.DomainModel.Baz, elt in elements(baz.FooArray))"). + Enumerable().GetEnumerator(); + } Assert.IsTrue(e.MoveNext()); } s.Delete(foo); Modified: trunk/nhibernate/src/NHibernate.Test/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2009-04-23 20:31:58 UTC (rev 4208) +++ trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2009-04-24 06:17:30 UTC (rev 4209) @@ -11,6 +11,8 @@ using NHibernate.Tool.hbm2ddl; using NHibernate.Type; using NUnit.Framework; +using NHibernate.Hql.Classic; +using NHibernate.Hql.Ast.ANTLR; namespace NHibernate.Test { @@ -27,15 +29,28 @@ get { return NHibernate.Dialect.Dialect.GetDialect(cfg.Properties); } } - protected bool IsClassicParser - { - get - { - return cfg.Properties[Cfg.Environment.QueryTranslator] == - typeof(NHibernate.Hql.Classic.ClassicQueryTranslatorFactory).FullName; - } - } + /// <summary> + /// To use in in-line test + /// </summary> + protected bool IsClassicParser + { + get + { + return sessions.Settings.QueryTranslatorFactory is ClassicQueryTranslatorFactory; + } + } + /// <summary> + /// To use in in-line test + /// </summary> + protected bool IsAntlrParser + { + get + { + return sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory; + } + } + protected ISession lastOpenedSession; private DebugConnectionProvider connectionProvider; @@ -74,6 +89,12 @@ CreateSchema(); BuildSessionFactory(); + if (!AppliesTo(sessions)) + { + DropSchema(); + Cleanup(); + Assert.Ignore(GetType() + " does not apply with the current session-factory configuration"); + } } catch (Exception e) { @@ -223,7 +244,10 @@ private void Cleanup() { - sessions.Close(); + if (sessions != null) + { + sessions.Close(); + } sessions = null; connectionProvider = null; lastOpenedSession = null; @@ -318,6 +342,11 @@ return true; } + protected virtual bool AppliesTo(ISessionFactoryImplementor factory) + { + return true; + } + protected virtual void Configure(Configuration configuration) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2009-04-23 20:32:12
|
Revision: 4208 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4208&view=rev Author: steverstrong Date: 2009-04-23 20:31:58 +0000 (Thu, 23 Apr 2009) Log Message: ----------- Modifications to remove .elements & .indices syntax. Now use elements(xxx) & indices(xxx) instead Modified Paths: -------------- trunk/nhibernate/releasenotes.txt trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs trunk/nhibernate/src/NHibernate.Test/Legacy/FumTest.cs trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs trunk/nhibernate/src/NHibernate.Test/Legacy/MultiTableTest.cs trunk/nhibernate/src/NHibernate.Test/TestCase.cs Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-04-23 16:05:01 UTC (rev 4207) +++ trunk/nhibernate/releasenotes.txt 2009-04-23 20:31:58 UTC (rev 4208) @@ -8,6 +8,7 @@ * compatible only with .NET2.0 SP1 or above (System.DateTimeOffset) * In SchemaExport.Execute the parameter "format" was removed; (NH-1701) enabled configuration property format_sql (default true) * Antlr3.Runtime.dll is required + * the syntax foo.bar.baz.elements or foo.bar.baz.indices is not longer supported. Use the alternative syntax of elements(foo.bar.baz) or indices(foo.bar.baz) instead ##### Possible Breaking Changes for external frameworks ##### * ISession interface has additional methods Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2009-04-23 16:05:01 UTC (rev 4207) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2009-04-23 20:31:58 UTC (rev 4208) @@ -1,4 +1,4 @@ -// $ANTLR 3.1.2 /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g 2009-04-23 17:07:34 +// $ANTLR 3.1.2 /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g 2009-04-23 21:03:14 // The variable 'variable' is assigned but its value is never used. #pragma warning disable 168, 219 @@ -1755,8 +1755,8 @@ { int _type = EQ; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:746:3: ( '=' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:746:5: '=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:741:3: ( '=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:741:5: '=' { Match('='); if (state.failed) return ; @@ -1778,8 +1778,8 @@ { int _type = LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:747:3: ( '<' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:747:5: '<' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:742:3: ( '<' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:742:5: '<' { Match('<'); if (state.failed) return ; @@ -1801,8 +1801,8 @@ { int _type = GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:748:3: ( '>' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:748:5: '>' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:743:3: ( '>' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:743:5: '>' { Match('>'); if (state.failed) return ; @@ -1824,8 +1824,8 @@ { int _type = SQL_NE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:749:7: ( '<>' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:749:9: '<>' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:744:7: ( '<>' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:744:9: '<>' { Match("<>"); if (state.failed) return ; @@ -1848,7 +1848,7 @@ { int _type = NE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:750:3: ( '!=' | '^=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:745:3: ( '!=' | '^=' ) int alt1 = 2; int LA1_0 = input.LA(1); @@ -1871,7 +1871,7 @@ switch (alt1) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:750:5: '!=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:745:5: '!=' { Match("!="); if (state.failed) return ; @@ -1879,7 +1879,7 @@ } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:750:12: '^=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:745:12: '^=' { Match("^="); if (state.failed) return ; @@ -1904,8 +1904,8 @@ { int _type = LE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:751:3: ( '<=' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:751:5: '<=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:746:3: ( '<=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:746:5: '<=' { Match("<="); if (state.failed) return ; @@ -1928,8 +1928,8 @@ { int _type = GE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:752:3: ( '>=' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:752:5: '>=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:747:3: ( '>=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:747:5: '>=' { Match(">="); if (state.failed) return ; @@ -1952,8 +1952,8 @@ { int _type = COMMA; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:754:6: ( ',' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:754:8: ',' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:749:6: ( ',' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:749:8: ',' { Match(','); if (state.failed) return ; @@ -1975,8 +1975,8 @@ { int _type = OPEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:756:5: ( '(' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:756:7: '(' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:751:5: ( '(' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:751:7: '(' { Match('('); if (state.failed) return ; @@ -1998,8 +1998,8 @@ { int _type = CLOSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:757:6: ( ')' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:757:8: ')' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:752:6: ( ')' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:752:8: ')' { Match(')'); if (state.failed) return ; @@ -2021,8 +2021,8 @@ { int _type = OPEN_BRACKET; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:758:13: ( '[' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:758:15: '[' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:753:13: ( '[' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:753:15: '[' { Match('['); if (state.failed) return ; @@ -2044,8 +2044,8 @@ { int _type = CLOSE_BRACKET; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:759:14: ( ']' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:759:16: ']' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:754:14: ( ']' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:754:16: ']' { Match(']'); if (state.failed) return ; @@ -2067,8 +2067,8 @@ { int _type = CONCAT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:761:7: ( '||' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:761:9: '||' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:756:7: ( '||' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:756:9: '||' { Match("||"); if (state.failed) return ; @@ -2091,8 +2091,8 @@ { int _type = PLUS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:762:5: ( '+' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:762:7: '+' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:757:5: ( '+' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:757:7: '+' { Match('+'); if (state.failed) return ; @@ -2114,8 +2114,8 @@ { int _type = MINUS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:763:6: ( '-' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:763:8: '-' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:758:6: ( '-' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:758:8: '-' { Match('-'); if (state.failed) return ; @@ -2137,8 +2137,8 @@ { int _type = STAR; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:764:5: ( '*' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:764:7: '*' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:759:5: ( '*' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:759:7: '*' { Match('*'); if (state.failed) return ; @@ -2160,8 +2160,8 @@ { int _type = DIV; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:4: ( '/' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:6: '/' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:760:4: ( '/' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:760:6: '/' { Match('/'); if (state.failed) return ; @@ -2183,8 +2183,8 @@ { int _type = COLON; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:766:6: ( ':' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:766:8: ':' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:761:6: ( ':' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:761:8: ':' { Match(':'); if (state.failed) return ; @@ -2206,8 +2206,8 @@ { int _type = PARAM; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:767:6: ( '?' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:767:8: '?' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:762:6: ( '?' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:762:8: '?' { Match('?'); if (state.failed) return ; @@ -2229,11 +2229,11 @@ { int _type = IDENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:2: ( ID_START_LETTER ( ID_LETTER )* ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:4: ID_START_LETTER ( ID_LETTER )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:2: ( ID_START_LETTER ( ID_LETTER )* ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:4: ID_START_LETTER ( ID_LETTER )* { mID_START_LETTER(); if (state.failed) return ; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:20: ( ID_LETTER )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:20: ( ID_LETTER )* do { int alt2 = 2; @@ -2248,7 +2248,7 @@ switch (alt2) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:22: ID_LETTER + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:22: ID_LETTER { mID_LETTER(); if (state.failed) return ; @@ -2280,7 +2280,7 @@ { try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:775:5: ( '_' | '$' | 'a' .. 'z' | 'A' .. 'Z' | '\\u0080' .. '\\ufffe' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:5: ( '_' | '$' | 'a' .. 'z' | 'A' .. 'Z' | '\\u0080' .. '\\ufffe' ) // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g: { if ( input.LA(1) == '$' || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u0080' && input.LA(1) <= '\uFFFE') ) @@ -2310,7 +2310,7 @@ { try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:5: ( ID_START_LETTER | '0' .. '9' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:779:5: ( ID_START_LETTER | '0' .. '9' ) // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g: { if ( input.LA(1) == '$' || (input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u0080' && input.LA(1) <= '\uFFFE') ) @@ -2342,11 +2342,11 @@ { int _type = QUOTED_String; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:4: ( '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:6: '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:4: ( '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:6: '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' { Match('\''); if (state.failed) return ; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:11: ( ( ESCqs )=> ESCqs | ~ '\\'' )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:11: ( ( ESCqs )=> ESCqs | ~ '\\'' )* do { int alt3 = 3; @@ -2372,14 +2372,14 @@ switch (alt3) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:13: ( ESCqs )=> ESCqs + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:13: ( ESCqs )=> ESCqs { mESCqs(); if (state.failed) return ; } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:31: ~ '\\'' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:31: ~ '\\'' { if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&') || (input.LA(1) >= '(' && input.LA(1) <= '\uFFFF') ) { @@ -2423,8 +2423,8 @@ { try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:794:2: ( '\\'' '\\'' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:795:3: '\\'' '\\'' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:2: ( '\\'' '\\'' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:790:3: '\\'' '\\'' { Match('\''); if (state.failed) return ; Match('\''); if (state.failed) return ; @@ -2445,10 +2445,10 @@ { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:5: ( ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:793:5: ( ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:793:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:793:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) int alt4 = 5; switch ( input.LA(1) ) { @@ -2491,21 +2491,21 @@ switch (alt4) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:13: ' ' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:793:13: ' ' { Match(' '); if (state.failed) return ; } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:799:7: '\\t' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:794:7: '\\t' { Match('\t'); if (state.failed) return ; } break; case 3 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:800:7: '\\r' '\\n' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:795:7: '\\r' '\\n' { Match('\r'); if (state.failed) return ; Match('\n'); if (state.failed) return ; @@ -2513,14 +2513,14 @@ } break; case 4 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:801:7: '\\n' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:796:7: '\\n' { Match('\n'); if (state.failed) return ; } break; case 5 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:802:7: '\\r' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:797:7: '\\r' { Match('\r'); if (state.failed) return ; @@ -2558,7 +2558,7 @@ IToken f4 = null; bool isDecimal=false; IToken t=null; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:811:2: ( '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? | ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:806:2: ( '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? | ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? ) int alt20 = 2; int LA20_0 = input.LA(1); @@ -2581,14 +2581,14 @@ switch (alt20) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:811:6: '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:806:6: '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? { Match('.'); if (state.failed) return ; if ( (state.backtracking==0) ) { _type = DOT; } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:4: ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:4: ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? int alt8 = 2; int LA8_0 = input.LA(1); @@ -2599,9 +2599,9 @@ switch (alt8) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:6: ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:6: ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:6: ( '0' .. '9' )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:6: ( '0' .. '9' )+ int cnt5 = 0; do { @@ -2617,7 +2617,7 @@ switch (alt5) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:7: '0' .. '9' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:7: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -2637,7 +2637,7 @@ loop5: ; // Stops C# compiler whinging that label 'loop5' has no statements - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:18: ( EXPONENT )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:18: ( EXPONENT )? int alt6 = 2; int LA6_0 = input.LA(1); @@ -2648,7 +2648,7 @@ switch (alt6) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:19: EXPONENT + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:19: EXPONENT { mEXPONENT(); if (state.failed) return ; @@ -2657,7 +2657,7 @@ } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:30: (f1= FLOAT_SUFFIX )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:30: (f1= FLOAT_SUFFIX )? int alt7 = 2; int LA7_0 = input.LA(1); @@ -2668,7 +2668,7 @@ switch (alt7) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:812:31: f1= FLOAT_SUFFIX + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:807:31: f1= FLOAT_SUFFIX { int f1Start992 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; @@ -2706,9 +2706,9 @@ } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:824:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:819:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:824:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:819:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) int alt13 = 2; int LA13_0 = input.LA(1); @@ -2731,14 +2731,14 @@ switch (alt13) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:824:6: '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:819:6: '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? { Match('0'); if (state.failed) return ; if ( (state.backtracking==0) ) { isDecimal = true; } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:825:4: ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:820:4: ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? int alt11 = 3; int LA11_0 = input.LA(1); @@ -2753,16 +2753,16 @@ switch (alt11) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:825:6: ( 'x' ) ( HEX_DIGIT )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:820:6: ( 'x' ) ( HEX_DIGIT )+ { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:825:6: ( 'x' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:825:7: 'x' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:820:6: ( 'x' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:820:7: 'x' { Match('x'); if (state.failed) return ; } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:826:5: ( HEX_DIGIT )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:821:5: ( HEX_DIGIT )+ int cnt9 = 0; do { @@ -2828,7 +2828,7 @@ switch (alt9) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:833:7: HEX_DIGIT + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:828:7: HEX_DIGIT { mHEX_DIGIT(); if (state.failed) return ; @@ -2852,9 +2852,9 @@ } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:835:6: ( '0' .. '7' )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:830:6: ( '0' .. '7' )+ { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:835:6: ( '0' .. '7' )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:830:6: ( '0' .. '7' )+ int cnt10 = 0; do { @@ -2870,7 +2870,7 @@ switch (alt10) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:835:7: '0' .. '7' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:830:7: '0' .. '7' { MatchRange('0','7'); if (state.failed) return ; @@ -2900,16 +2900,16 @@ } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:837:5: ( '1' .. '9' ) ( '0' .. '9' )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:832:5: ( '1' .. '9' ) ( '0' .. '9' )* { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:837:5: ( '1' .. '9' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:837:6: '1' .. '9' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:832:5: ( '1' .. '9' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:832:6: '1' .. '9' { MatchRange('1','9'); if (state.failed) return ; } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:837:16: ( '0' .. '9' )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:832:16: ( '0' .. '9' )* do { int alt12 = 2; @@ -2924,7 +2924,7 @@ switch (alt12) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:837:17: '0' .. '9' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:832:17: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -2949,7 +2949,7 @@ } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:3: ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:834:3: ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? int alt19 = 3; int LA19_0 = input.LA(1); @@ -2964,10 +2964,10 @@ switch (alt19) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:5: ( 'l' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:834:5: ( 'l' ) { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:5: ( 'l' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:6: 'l' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:834:5: ( 'l' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:834:6: 'l' { Match('l'); if (state.failed) return ; @@ -2981,14 +2981,14 @@ } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:842:5: {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:837:5: {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) { if ( !((isDecimal)) ) { if ( state.backtracking > 0 ) {state.failed = true; return ;} throw new FailedPredicateException(input, "NUM_INT", "isDecimal"); } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:4: ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:4: ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) int alt18 = 3; switch ( input.LA(1) ) { @@ -3019,10 +3019,10 @@ switch (alt18) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:8: '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:8: '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? { Match('.'); if (state.failed) return ; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:12: ( '0' .. '9' )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:12: ( '0' .. '9' )* do { int alt14 = 2; @@ -3037,7 +3037,7 @@ switch (alt14) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:13: '0' .. '9' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:13: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -3052,7 +3052,7 @@ loop14: ; // Stops C# compiler whining that label 'loop14' has no statements - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:24: ( EXPONENT )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:24: ( EXPONENT )? int alt15 = 2; int LA15_0 = input.LA(1); @@ -3063,7 +3063,7 @@ switch (alt15) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:25: EXPONENT + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:25: EXPONENT { mEXPONENT(); if (state.failed) return ; @@ -3072,7 +3072,7 @@ } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:36: (f2= FLOAT_SUFFIX )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:36: (f2= FLOAT_SUFFIX )? int alt16 = 2; int LA16_0 = input.LA(1); @@ -3083,7 +3083,7 @@ switch (alt16) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:843:37: f2= FLOAT_SUFFIX + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:838:37: f2= FLOAT_SUFFIX { int f2Start1194 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; @@ -3102,10 +3102,10 @@ } break; case 2 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:844:8: EXPONENT (f3= FLOAT_SUFFIX )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:8: EXPONENT (f3= FLOAT_SUFFIX )? { mEXPONENT(); if (state.failed) return ; - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:844:17: (f3= FLOAT_SUFFIX )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:17: (f3= FLOAT_SUFFIX )? int alt17 = 2; int LA17_0 = input.LA(1); @@ -3116,7 +3116,7 @@ switch (alt17) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:844:18: f3= FLOAT_SUFFIX + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:839:18: f3= FLOAT_SUFFIX { int f3Start1212 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; @@ -3135,7 +3135,7 @@ } break; case 3 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:845:8: f4= FLOAT_SUFFIX + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:840:8: f4= FLOAT_SUFFIX { int f4Start1227 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; @@ -3188,8 +3188,8 @@ { try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:863:2: ( ( '0' .. '9' | 'a' .. 'f' ) ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:863:4: ( '0' .. '9' | 'a' .. 'f' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:858:2: ( ( '0' .. '9' | 'a' .. 'f' ) ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:858:4: ( '0' .. '9' | 'a' .. 'f' ) { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'a' && input.LA(1) <= 'f') ) { @@ -3218,17 +3218,17 @@ { try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:2: ( ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:4: ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:2: ( ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:4: ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:4: ( 'e' ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:5: 'e' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:4: ( 'e' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:5: 'e' { Match('e'); if (state.failed) return ; } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:10: ( '+' | '-' )? + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:10: ( '+' | '-' )? int alt21 = 2; int LA21_0 = input.LA(1); @@ -3259,7 +3259,7 @@ } - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:21: ( '0' .. '9' )+ + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:21: ( '0' .. '9' )+ int cnt22 = 0; do { @@ -3275,7 +3275,7 @@ switch (alt22) { case 1 : - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:22: '0' .. '9' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:864:22: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -3310,7 +3310,7 @@ { try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:874:2: ( 'f' | 'd' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:869:2: ( 'f' | 'd' ) // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g: { if ( input.LA(1) == 'd' || input.LA(1) == 'f' ) @@ -3972,8 +3972,8 @@ // $ANTLR start "synpred1_Hql" public void synpred1_Hql_fragment() { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:13: ( ESCqs ) - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:14: ESCqs + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:13: ( ESCqs ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:14: ESCqs { mESCqs(); if (state.failed) return ; Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs 2009-04-23 16:05:01 UTC (rev 4207) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs 2009-04-23 20:31:58 UTC (rev 4208) @@ -1,4 +1,4 @@ -// $ANTLR 3.1.2 /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g 2009-04-23 17:07:33 +// $ANTLR 3.1.2 /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g 2009-04-23 21:03:14 // The variable 'variable' is assigned but its value is never used. #pragma warning disable 168, 219 @@ -2205,7 +2205,7 @@ // AST REWRITE - // elements: path, selectedPropertiesList + // elements: selectedPropertiesList, path // token labels: // rule labels: retval // token list labels: @@ -3331,7 +3331,62 @@ { // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:300:2: ( fromClassOrOuterQueryPath | inClassDeclaration | inCollectionDeclaration | inCollectionElementsDeclaration ) int alt31 = 4; - alt31 = dfa31.Predict(input); + switch ( input.LA(1) ) + { + case IDENT: + { + int LA31_1 = input.LA(2); + + if ( (LA31_1 == IN) ) + { + int LA31_4 = input.LA(3); + + if ( (LA31_4 == ELEMENTS) ) + { + alt31 = 4; + } + else if ( (LA31_4 == CLASS || LA31_4 == IDENT) ) + { + alt31 = 2; + } + else + { + NoViableAltException nvae_d31s4 = + new NoViableAltException("", 31, 4, input); + + throw nvae_d31s4; + } + } + else if ( (LA31_1 == EOF || LA31_1 == AS || LA31_1 == DOT || LA31_1 == FETCH || (LA31_1 >= FULL && LA31_1 <= GROUP) || LA31_1 == INNER || (LA31_1 >= JOIN && LA31_1 <= LEFT) || LA31_1 == ORDER || LA31_1 == RIGHT || LA31_1 == UNION || LA31_1 == WHERE || LA31_1 == COMMA || LA31_1 == CLOSE || LA31_1 == IDENT) ) + { + alt31 = 1; + } + else + { + NoViableAltException nvae_d31s1 = + new NoViableAltException("", 31, 1, input); + + throw nvae_d31s1; + } + } + break; + case IN: + { + alt31 = 3; + } + break; + case ELEMENTS: + { + alt31 = 4; + } + break; + default: + NoViableAltException nvae_d31s0 = + new NoViableAltException("", 31, 0, input); + + throw nvae_d31s0; + } + switch (alt31) { case 1 : @@ -3499,7 +3554,7 @@ // AST REWRITE - // elements: propertyFetch, asAlias, path + // elements: asAlias, path, propertyFetch // token labels: // rule labels: retval // token list labels: @@ -3635,7 +3690,7 @@ // AST REWRITE - // elements: path, alias + // elements: alias, path // token labels: // rule labels: retval // token list labels: @@ -3805,7 +3860,7 @@ }; // $ANTLR start "inCollectionElementsDeclaration" - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:321:1: inCollectionElementsDeclaration : ( alias IN ELEMENTS OPEN path CLOSE -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) | ELEMENTS OPEN path CLOSE AS alias -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) | alias IN path DOT ELEMENTS -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) ); + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:321:1: inCollectionElementsDeclaration : ( alias IN ELEMENTS OPEN path CLOSE -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) | ELEMENTS OPEN path CLOSE AS alias -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) ); public HqlParser.inCollectionElementsDeclaration_return inCollectionElementsDeclaration() // throws RecognitionException [1] { HqlParser.inCollectionElementsDeclaration_return retval = new HqlParser.inCollectionElementsDeclaration_return(); @@ -3821,9 +3876,6 @@ IToken OPEN110 = null; IToken CLOSE112 = null; IToken AS113 = null; - IToken IN116 = null; - IToken DOT118 = null; - IToken ELEMENTS119 = null; HqlParser.alias_return alias103 = default(HqlParser.alias_return); HqlParser.path_return path107 = default(HqlParser.path_return); @@ -3832,11 +3884,7 @@ HqlParser.alias_return alias114 = default(HqlParser.alias_return); - HqlParser.alias_return alias115 = default(HqlParser.alias_return); - HqlParser.path_return path117 = default(HqlParser.path_return); - - IASTNode IN104_tree=null; IASTNode ELEMENTS105_tree=null; IASTNode OPEN106_tree=null; @@ -3845,54 +3893,22 @@ IASTNode OPEN110_tree=null; IASTNode CLOSE112_tree=null; IASTNode AS113_tree=null; - IASTNode IN116_tree=null; - IASTNode DOT118_tree=null; - IASTNode ELEMENTS119_tree=null; RewriteRuleTokenStream stream_CLOSE = new RewriteRuleTokenStream(adaptor,"token CLOSE"); RewriteRuleTokenStream stream_ELEMENTS = new RewriteRuleTokenStream(adaptor,"token ELEMENTS"); RewriteRuleTokenStream stream_AS = new RewriteRuleTokenStream(adaptor,"token AS"); RewriteRuleTokenStream stream_OPEN = new RewriteRuleTokenStream(adaptor,"token OPEN"); - RewriteRuleTokenStream stream_DOT = new RewriteRuleTokenStream(adaptor,"token DOT"); RewriteRuleTokenStream stream_IN = new RewriteRuleTokenStream(adaptor,"token IN"); RewriteRuleSubtreeStream stream_path = new RewriteRuleSubtreeStream(adaptor,"rule path"); RewriteRuleSubtreeStream stream_alias = new RewriteRuleSubtreeStream(adaptor,"rule alias"); try { - // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:322:2: ( alias IN ELEMENTS OPEN path CLOSE -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) | ELEMENTS OPEN path CLOSE AS alias -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) | alias IN path DOT ELEMENTS -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) ) - int alt35 = 3; + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:322:2: ( alias IN ELEMENTS OPEN path CLOSE -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) | ELEMENTS OPEN path CLOSE AS alias -> ^( JOIN[\"join\"] INNER[\"inner\"] path alias ) ) + int alt35 = 2; int LA35_0 = input.LA(1); if ( (LA35_0 == IDENT) ) { - int LA35_1 = input.LA(2); - - if ( (LA35_1 == IN) ) - { - int LA35_3 = input.LA(3); - - if ( (LA35_3 == ELEMENTS) ) - { - alt35 = 1; - } - else if ( (LA35_3 == IDENT) ) - { - alt35 = 3; - } - else - { - NoViableAltException nvae_d35s3 = - new NoViableAltException("", 35, 3, input); - - throw nvae_d35s3; - } - } - else - { - NoViableAltException nvae_d35s1 = - new NoViableAltException("", 35, 1, input); - - throw nvae_d35s1; - } +... [truncated message content] |
From: <ste...@us...> - 2009-04-23 16:05:13
|
Revision: 4207 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4207&view=rev Author: steverstrong Date: 2009-04-23 16:05:01 +0000 (Thu, 23 Apr 2009) Log Message: ----------- Updates to get Legacy\FooBarTest.CollectionsInSelect() test case passing Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromClause.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2009-04-23 06:03:26 UTC (rev 4206) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2009-04-23 16:05:01 UTC (rev 4207) @@ -1,4 +1,4 @@ -// $ANTLR 3.1.2 /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g 2009-04-17 11:12:37 +// $ANTLR 3.1.2 /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g 2009-04-23 17:07:34 // The variable 'variable' is assigned but its value is never used. #pragma warning disable 168, 219 @@ -161,7 +161,7 @@ override public string GrammarFileName { - get { return "/Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g";} + get { return "/Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g";} } // $ANTLR start "ALL" @@ -171,8 +171,8 @@ { int _type = ALL; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:9:5: ( 'all' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:9:7: 'all' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:9:5: ( 'all' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:9:7: 'all' { Match("all"); if (state.failed) return ; @@ -195,8 +195,8 @@ { int _type = ANY; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:10:5: ( 'any' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:10:7: 'any' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:10:5: ( 'any' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:10:7: 'any' { Match("any"); if (state.failed) return ; @@ -219,8 +219,8 @@ { int _type = AND; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:11:5: ( 'and' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:11:7: 'and' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:11:5: ( 'and' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:11:7: 'and' { Match("and"); if (state.failed) return ; @@ -243,8 +243,8 @@ { int _type = AS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:12:4: ( 'as' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:12:6: 'as' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:12:4: ( 'as' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:12:6: 'as' { Match("as"); if (state.failed) return ; @@ -267,8 +267,8 @@ { int _type = ASCENDING; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:13:11: ( 'asc' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:13:13: 'asc' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:13:11: ( 'asc' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:13:13: 'asc' { Match("asc"); if (state.failed) return ; @@ -291,8 +291,8 @@ { int _type = AVG; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:14:5: ( 'avg' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:14:7: 'avg' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:14:5: ( 'avg' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:14:7: 'avg' { Match("avg"); if (state.failed) return ; @@ -315,8 +315,8 @@ { int _type = BETWEEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:15:9: ( 'between' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:15:11: 'between' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:15:9: ( 'between' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:15:11: 'between' { Match("between"); if (state.failed) return ; @@ -339,8 +339,8 @@ { int _type = CLASS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:16:7: ( 'class' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:16:9: 'class' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:16:7: ( 'class' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:16:9: 'class' { Match("class"); if (state.failed) return ; @@ -363,8 +363,8 @@ { int _type = COUNT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:17:7: ( 'count' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:17:9: 'count' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:17:7: ( 'count' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:17:9: 'count' { Match("count"); if (state.failed) return ; @@ -387,8 +387,8 @@ { int _type = DELETE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:18:8: ( 'delete' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:18:10: 'delete' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:18:8: ( 'delete' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:18:10: 'delete' { Match("delete"); if (state.failed) return ; @@ -411,8 +411,8 @@ { int _type = DESCENDING; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:19:12: ( 'desc' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:19:14: 'desc' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:19:12: ( 'desc' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:19:14: 'desc' { Match("desc"); if (state.failed) return ; @@ -435,8 +435,8 @@ { int _type = DISTINCT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:20:10: ( 'distinct' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:20:12: 'distinct' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:20:10: ( 'distinct' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:20:12: 'distinct' { Match("distinct"); if (state.failed) return ; @@ -459,8 +459,8 @@ { int _type = ELEMENTS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:21:10: ( 'elements' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:21:12: 'elements' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:21:10: ( 'elements' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:21:12: 'elements' { Match("elements"); if (state.failed) return ; @@ -483,8 +483,8 @@ { int _type = ESCAPE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:22:8: ( 'escape' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:22:10: 'escape' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:22:8: ( 'escape' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:22:10: 'escape' { Match("escape"); if (state.failed) return ; @@ -507,8 +507,8 @@ { int _type = EXISTS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:23:8: ( 'exists' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:23:10: 'exists' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:23:8: ( 'exists' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:23:10: 'exists' { Match("exists"); if (state.failed) return ; @@ -531,8 +531,8 @@ { int _type = FALSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:24:7: ( 'false' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:24:9: 'false' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:24:7: ( 'false' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:24:9: 'false' { Match("false"); if (state.failed) return ; @@ -555,8 +555,8 @@ { int _type = FETCH; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:25:7: ( 'fetch' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:25:9: 'fetch' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:25:7: ( 'fetch' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:25:9: 'fetch' { Match("fetch"); if (state.failed) return ; @@ -579,8 +579,8 @@ { int _type = FROM; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:26:6: ( 'from' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:26:8: 'from' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:26:6: ( 'from' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:26:8: 'from' { Match("from"); if (state.failed) return ; @@ -603,8 +603,8 @@ { int _type = FULL; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:27:6: ( 'full' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:27:8: 'full' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:27:6: ( 'full' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:27:8: 'full' { Match("full"); if (state.failed) return ; @@ -627,8 +627,8 @@ { int _type = GROUP; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:28:7: ( 'group' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:28:9: 'group' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:28:7: ( 'group' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:28:9: 'group' { Match("group"); if (state.failed) return ; @@ -651,8 +651,8 @@ { int _type = HAVING; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:29:8: ( 'having' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:29:10: 'having' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:29:8: ( 'having' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:29:10: 'having' { Match("having"); if (state.failed) return ; @@ -675,8 +675,8 @@ { int _type = IN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:30:4: ( 'in' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:30:6: 'in' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:30:4: ( 'in' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:30:6: 'in' { Match("in"); if (state.failed) return ; @@ -699,8 +699,8 @@ { int _type = INDICES; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:31:9: ( 'indices' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:31:11: 'indices' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:31:9: ( 'indices' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:31:11: 'indices' { Match("indices"); if (state.failed) return ; @@ -723,8 +723,8 @@ { int _type = INNER; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:32:7: ( 'inner' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:32:9: 'inner' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:32:7: ( 'inner' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:32:9: 'inner' { Match("inner"); if (state.failed) return ; @@ -747,8 +747,8 @@ { int _type = INSERT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:33:8: ( 'insert' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:33:10: 'insert' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:33:8: ( 'insert' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:33:10: 'insert' { Match("insert"); if (state.failed) return ; @@ -771,8 +771,8 @@ { int _type = INTO; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:34:6: ( 'into' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:34:8: 'into' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:34:6: ( 'into' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:34:8: 'into' { Match("into"); if (state.failed) return ; @@ -795,8 +795,8 @@ { int _type = IS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:35:4: ( 'is' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:35:6: 'is' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:35:4: ( 'is' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:35:6: 'is' { Match("is"); if (state.failed) return ; @@ -819,8 +819,8 @@ { int _type = JOIN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:36:6: ( 'join' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:36:8: 'join' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:36:6: ( 'join' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:36:8: 'join' { Match("join"); if (state.failed) return ; @@ -843,8 +843,8 @@ { int _type = LEFT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:37:6: ( 'left' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:37:8: 'left' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:37:6: ( 'left' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:37:8: 'left' { Match("left"); if (state.failed) return ; @@ -867,8 +867,8 @@ { int _type = LIKE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:38:6: ( 'like' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:38:8: 'like' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:38:6: ( 'like' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:38:8: 'like' { Match("like"); if (state.failed) return ; @@ -891,8 +891,8 @@ { int _type = MAX; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:39:5: ( 'max' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:39:7: 'max' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:39:5: ( 'max' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:39:7: 'max' { Match("max"); if (state.failed) return ; @@ -915,8 +915,8 @@ { int _type = MIN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:40:5: ( 'min' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:40:7: 'min' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:40:5: ( 'min' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:40:7: 'min' { Match("min"); if (state.failed) return ; @@ -939,8 +939,8 @@ { int _type = NEW; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:41:5: ( 'new' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:41:7: 'new' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:41:5: ( 'new' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:41:7: 'new' { Match("new"); if (state.failed) return ; @@ -963,8 +963,8 @@ { int _type = NOT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:42:5: ( 'not' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:42:7: 'not' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:42:5: ( 'not' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:42:7: 'not' { Match("not"); if (state.failed) return ; @@ -987,8 +987,8 @@ { int _type = NULL; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:43:6: ( 'null' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:43:8: 'null' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:43:6: ( 'null' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:43:8: 'null' { Match("null"); if (state.failed) return ; @@ -1011,8 +1011,8 @@ { int _type = OR; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:44:4: ( 'or' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:44:6: 'or' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:44:4: ( 'or' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:44:6: 'or' { Match("or"); if (state.failed) return ; @@ -1035,8 +1035,8 @@ { int _type = ORDER; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:45:7: ( 'order' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:45:9: 'order' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:45:7: ( 'order' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:45:9: 'order' { Match("order"); if (state.failed) return ; @@ -1059,8 +1059,8 @@ { int _type = OUTER; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:46:7: ( 'outer' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:46:9: 'outer' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:46:7: ( 'outer' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:46:9: 'outer' { Match("outer"); if (state.failed) return ; @@ -1083,8 +1083,8 @@ { int _type = PROPERTIES; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:47:12: ( 'properties' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:47:14: 'properties' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:47:12: ( 'properties' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:47:14: 'properties' { Match("properties"); if (state.failed) return ; @@ -1107,8 +1107,8 @@ { int _type = RIGHT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:48:7: ( 'right' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:48:9: 'right' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:48:7: ( 'right' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:48:9: 'right' { Match("right"); if (state.failed) return ; @@ -1131,8 +1131,8 @@ { int _type = SELECT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:49:8: ( 'select' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:49:10: 'select' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:49:8: ( 'select' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:49:10: 'select' { Match("select"); if (state.failed) return ; @@ -1155,8 +1155,8 @@ { int _type = SET; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:50:5: ( 'set' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:50:7: 'set' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:50:5: ( 'set' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:50:7: 'set' { Match("set"); if (state.failed) return ; @@ -1179,8 +1179,8 @@ { int _type = SOME; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:51:6: ( 'some' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:51:8: 'some' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:51:6: ( 'some' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:51:8: 'some' { Match("some"); if (state.failed) return ; @@ -1203,8 +1203,8 @@ { int _type = SUM; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:52:5: ( 'sum' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:52:7: 'sum' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:52:5: ( 'sum' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:52:7: 'sum' { Match("sum"); if (state.failed) return ; @@ -1227,8 +1227,8 @@ { int _type = TRUE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:53:6: ( 'true' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:53:8: 'true' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:53:6: ( 'true' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:53:8: 'true' { Match("true"); if (state.failed) return ; @@ -1251,8 +1251,8 @@ { int _type = UNION; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:54:7: ( 'union' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:54:9: 'union' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:54:7: ( 'union' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:54:9: 'union' { Match("union"); if (state.failed) return ; @@ -1275,8 +1275,8 @@ { int _type = UPDATE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:55:8: ( 'update' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:55:10: 'update' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:55:8: ( 'update' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:55:10: 'update' { Match("update"); if (state.failed) return ; @@ -1299,8 +1299,8 @@ { int _type = VERSIONED; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:56:11: ( 'versioned' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:56:13: 'versioned' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:56:11: ( 'versioned' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:56:13: 'versioned' { Match("versioned"); if (state.failed) return ; @@ -1323,8 +1323,8 @@ { int _type = WHERE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:57:7: ( 'where' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:57:9: 'where' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:57:7: ( 'where' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:57:9: 'where' { Match("where"); if (state.failed) return ; @@ -1347,8 +1347,8 @@ { int _type = LITERAL_by; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:58:12: ( 'by' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:58:14: 'by' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:58:12: ( 'by' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:58:14: 'by' { Match("by"); if (state.failed) return ; @@ -1371,8 +1371,8 @@ { int _type = CASE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:59:6: ( 'case' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:59:8: 'case' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:59:6: ( 'case' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:59:8: 'case' { Match("case"); if (state.failed) return ; @@ -1395,8 +1395,8 @@ { int _type = END; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:60:5: ( 'end' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:60:7: 'end' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:60:5: ( 'end' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:60:7: 'end' { Match("end"); if (state.failed) return ; @@ -1419,8 +1419,8 @@ { int _type = ELSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:61:6: ( 'else' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:61:8: 'else' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:61:6: ( 'else' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:61:8: 'else' { Match("else"); if (state.failed) return ; @@ -1443,8 +1443,8 @@ { int _type = THEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:62:6: ( 'then' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:62:8: 'then' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:62:6: ( 'then' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:62:8: 'then' { Match("then"); if (state.failed) return ; @@ -1467,8 +1467,8 @@ { int _type = WHEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:63:6: ( 'when' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:63:8: 'when' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:63:6: ( 'when' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:63:8: 'when' { Match("when"); if (state.failed) return ; @@ -1491,8 +1491,8 @@ { int _type = ON; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:64:4: ( 'on' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:64:6: 'on' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:64:4: ( 'on' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:64:6: 'on' { Match("on"); if (state.failed) return ; @@ -1515,8 +1515,8 @@ { int _type = WITH; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:65:6: ( 'with' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:65:8: 'with' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:65:6: ( 'with' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:65:8: 'with' { Match("with"); if (state.failed) return ; @@ -1539,8 +1539,8 @@ { int _type = BOTH; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:66:6: ( 'both' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:66:8: 'both' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:66:6: ( 'both' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:66:8: 'both' { Match("both"); if (state.failed) return ; @@ -1563,8 +1563,8 @@ { int _type = EMPTY; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:67:7: ( 'empty' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:67:9: 'empty' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:67:7: ( 'empty' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:67:9: 'empty' { Match("empty"); if (state.failed) return ; @@ -1587,8 +1587,8 @@ { int _type = LEADING; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:68:9: ( 'leading' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:68:11: 'leading' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:68:9: ( 'leading' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:68:11: 'leading' { Match("leading"); if (state.failed) return ; @@ -1611,8 +1611,8 @@ { int _type = MEMBER; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:69:8: ( 'member' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:69:10: 'member' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:69:8: ( 'member' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:69:10: 'member' { Match("member"); if (state.failed) return ; @@ -1635,8 +1635,8 @@ { int _type = OBJECT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:70:8: ( 'object' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:70:10: 'object' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:70:8: ( 'object' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:70:10: 'object' { Match("object"); if (state.failed) return ; @@ -1659,8 +1659,8 @@ { int _type = OF; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:71:4: ( 'of' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:71:6: 'of' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:71:4: ( 'of' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:71:6: 'of' { Match("of"); if (state.failed) return ; @@ -1683,8 +1683,8 @@ { int _type = TRAILING; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:72:10: ( 'trailing' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:72:12: 'trailing' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:72:10: ( 'trailing' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:72:12: 'trailing' { Match("trailing"); if (state.failed) return ; @@ -1707,8 +1707,8 @@ { int _type = T__126; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:73:8: ( 'ascending' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:73:10: 'ascending' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:73:8: ( 'ascending' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:73:10: 'ascending' { Match("ascending"); if (state.failed) return ; @@ -1731,8 +1731,8 @@ { int _type = T__127; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:74:8: ( 'descending' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:74:10: 'descending' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:74:8: ( 'descending' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:74:10: 'descending' { Match("descending"); if (state.failed) return ; @@ -1755,8 +1755,8 @@ { int _type = EQ; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:744:3: ( '=' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:744:5: '=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:746:3: ( '=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:746:5: '=' { Match('='); if (state.failed) return ; @@ -1778,8 +1778,8 @@ { int _type = LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:745:3: ( '<' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:745:5: '<' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:747:3: ( '<' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:747:5: '<' { Match('<'); if (state.failed) return ; @@ -1801,8 +1801,8 @@ { int _type = GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:746:3: ( '>' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:746:5: '>' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:748:3: ( '>' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:748:5: '>' { Match('>'); if (state.failed) return ; @@ -1824,8 +1824,8 @@ { int _type = SQL_NE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:747:7: ( '<>' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:747:9: '<>' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:749:7: ( '<>' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:749:9: '<>' { Match("<>"); if (state.failed) return ; @@ -1848,7 +1848,7 @@ { int _type = NE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:748:3: ( '!=' | '^=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:750:3: ( '!=' | '^=' ) int alt1 = 2; int LA1_0 = input.LA(1); @@ -1871,7 +1871,7 @@ switch (alt1) { case 1 : - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:748:5: '!=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:750:5: '!=' { Match("!="); if (state.failed) return ; @@ -1879,7 +1879,7 @@ } break; case 2 : - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:748:12: '^=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:750:12: '^=' { Match("^="); if (state.failed) return ; @@ -1904,8 +1904,8 @@ { int _type = LE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:749:3: ( '<=' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:749:5: '<=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:751:3: ( '<=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:751:5: '<=' { Match("<="); if (state.failed) return ; @@ -1928,8 +1928,8 @@ { int _type = GE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:750:3: ( '>=' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:750:5: '>=' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:752:3: ( '>=' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:752:5: '>=' { Match(">="); if (state.failed) return ; @@ -1952,8 +1952,8 @@ { int _type = COMMA; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:752:6: ( ',' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:752:8: ',' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:754:6: ( ',' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:754:8: ',' { Match(','); if (state.failed) return ; @@ -1975,8 +1975,8 @@ { int _type = OPEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:754:5: ( '(' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:754:7: '(' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:756:5: ( '(' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:756:7: '(' { Match('('); if (state.failed) return ; @@ -1998,8 +1998,8 @@ { int _type = CLOSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:755:6: ( ')' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:755:8: ')' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:757:6: ( ')' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:757:8: ')' { Match(')'); if (state.failed) return ; @@ -2021,8 +2021,8 @@ { int _type = OPEN_BRACKET; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:756:13: ( '[' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:756:15: '[' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:758:13: ( '[' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:758:15: '[' { Match('['); if (state.failed) return ; @@ -2044,8 +2044,8 @@ { int _type = CLOSE_BRACKET; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:757:14: ( ']' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:757:16: ']' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:759:14: ( ']' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:759:16: ']' { Match(']'); if (state.failed) return ; @@ -2067,8 +2067,8 @@ { int _type = CONCAT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:759:7: ( '||' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:759:9: '||' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:761:7: ( '||' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:761:9: '||' { Match("||"); if (state.failed) return ; @@ -2091,8 +2091,8 @@ { int _type = PLUS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:760:5: ( '+' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:760:7: '+' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:762:5: ( '+' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:762:7: '+' { Match('+'); if (state.failed) return ; @@ -2114,8 +2114,8 @@ { int _type = MINUS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:761:6: ( '-' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:761:8: '-' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:763:6: ( '-' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:763:8: '-' { Match('-'); if (state.failed) return ; @@ -2137,8 +2137,8 @@ { int _type = STAR; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:762:5: ( '*' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:762:7: '*' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:764:5: ( '*' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:764:7: '*' { Match('*'); if (state.failed) return ; @@ -2160,8 +2160,8 @@ { int _type = DIV; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:763:4: ( '/' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:763:6: '/' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:4: ( '/' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:765:6: '/' { Match('/'); if (state.failed) return ; @@ -2183,8 +2183,8 @@ { int _type = COLON; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:764:6: ( ':' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:764:8: ':' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:766:6: ( ':' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:766:8: ':' { Match(':'); if (state.failed) return ; @@ -2206,8 +2206,8 @@ { int _type = PARAM; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:765:6: ( '?' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:765:8: '?' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:767:6: ( '?' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:767:8: '?' { Match('?'); if (state.failed) return ; @@ -2229,11 +2229,11 @@ { int _type = IDENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:768:2: ( ID_START_LETTER ( ID_LETTER )* ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:768:4: ID_START_LETTER ( ID_LETTER )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:2: ( ID_START_LETTER ( ID_LETTER )* ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:4: ID_START_LETTER ( ID_LETTER )* { mID_START_LETTER(); if (state.failed) return ; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:768:20: ( ID_LETTER )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:20: ( ID_LETTER )* do { int alt2 = 2; @@ -2248,7 +2248,7 @@ switch (alt2) { case 1 : - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:768:22: ID_LETTER + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:770:22: ID_LETTER { mID_LETTER(); if (state.failed) return ; @@ -2280,8 +2280,8 @@ { try { - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:773:5: ( '_' | '$' | 'a' .. 'z' | 'A' .. 'Z' | '\\u0080' .. '\\ufffe' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g: + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:775:5: ( '_' | '$' | 'a' .. 'z' | 'A' .. 'Z' | '\\u0080' .. '\\ufffe' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g: { if ( input.LA(1) == '$' || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u0080' && input.LA(1) <= '\uFFFE') ) { @@ -2310,8 +2310,8 @@ { try { - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:782:5: ( ID_START_LETTER | '0' .. '9' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g: + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:784:5: ( ID_START_LETTER | '0' .. '9' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g: { if ( input.LA(1) == '$' || (input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u0080' && input.LA(1) <= '\uFFFE') ) { @@ -2342,11 +2342,11 @@ { int _type = QUOTED_String; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:787:4: ( '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:787:6: '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:4: ( '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:6: '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' { Match('\''); if (state.failed) return ; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:787:11: ( ( ESCqs )=> ESCqs | ~ '\\'' )* + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:11: ( ( ESCqs )=> ESCqs | ~ '\\'' )* do { int alt3 = 3; @@ -2372,14 +2372,14 @@ switch (alt3) { case 1 : - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:787:13: ( ESCqs )=> ESCqs + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:13: ( ESCqs )=> ESCqs { mESCqs(); if (state.failed) return ; } break; case 2 : - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:787:31: ~ '\\'' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:789:31: ~ '\\'' { if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&') || (input.LA(1) >= '(' && input.LA(1) <= '\uFFFF') ) { @@ -2423,8 +2423,8 @@ { try { - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:792:2: ( '\\'' '\\'' ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:793:3: '\\'' '\\'' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:794:2: ( '\\'' '\\'' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:795:3: '\\'' '\\'' { Match('\''); if (state.failed) return ; Match('\''); if (state.failed) return ; @@ -2445,10 +2445,10 @@ { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:796:5: ( ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) ) - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:796:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:5: ( ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) { - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:796:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) int alt4 = 5; switch ( input.LA(1) ) { @@ -2491,21 +2491,21 @@ switch (alt4) { case 1 : - // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:796:13: ' ' + // /Users/Steve/Projects/NHibernate/Trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:798:13: ' ' { Match(' '); if (state.failed) return ; } break; case 2 : - ... [truncated message content] |
From: <fab...@us...> - 2009-04-23 06:03:29
|
Revision: 4206 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4206&view=rev Author: fabiomaulo Date: 2009-04-23 06:03:26 +0000 (Thu, 23 Apr 2009) Log Message: ----------- - Refactoring, bug fix of AST QT - commented test not present in H3.2 and unneeded because wrong Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionList.cs trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryLogicOperatorNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryLogicOperatorNode.cs 2009-04-23 04:46:55 UTC (rev 4205) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryLogicOperatorNode.cs 2009-04-23 06:03:26 UTC (rev 4206) @@ -2,7 +2,6 @@ using Antlr.Runtime; using NHibernate.Engine; using NHibernate.Hql.Ast.ANTLR.Parameters; -using NHibernate.Hql.Ast.ANTLR.Util; using NHibernate.Type; using NHibernate.Util; Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs 2009-04-23 04:46:55 UTC (rev 4205) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs 2009-04-23 06:03:26 UTC (rev 4206) @@ -14,6 +14,7 @@ /// </summary> public class SelectClause : SelectExpressionList { + private const string JoinFetchWithoutOwnerExceptionMsg = "Query specified join fetching, but the owner of the fetched association was not present in the select list [{0}]"; private bool _prepared; private bool _scalarSelect; private List<FromElement> _collectionFromElements; @@ -196,12 +197,9 @@ origin = fromElement.RealOrigin; } - if ( !_fromElementsForLoad.Contains( origin ) ) { - throw new QueryException( - "query specified join fetching, but the owner " + - "of the fetched association was not present in the select list " + - "[" + fromElement.GetDisplayText() + "]" - ); + if (!_fromElementsForLoad.Contains(origin)) + { + throw new QueryException(string.Format(JoinFetchWithoutOwnerExceptionMsg, fromElement.GetDisplayText())); } IType type = fromElement.SelectType; Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionList.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionList.cs 2009-04-23 04:46:55 UTC (rev 4205) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionList.cs 2009-04-23 06:03:26 UTC (rev 4206) @@ -25,21 +25,21 @@ // are not select expressions (e.g. DISTINCT). IASTNode firstChild = GetFirstSelectExpression(); IASTNode parent = this; - List<ISelectExpression> list = new List<ISelectExpression>(parent.ChildCount); + var list = new List<ISelectExpression>(parent.ChildCount); - for (int i = firstChild.ChildIndex; i < this.ChildCount; i++) + for (IASTNode n = firstChild; n != null; n = n.NextSibling) { - IASTNode n = GetChild(i); - - if ( n is ISelectExpression ) + var se = n as ISelectExpression; + if (se != null) { - list.Add((ISelectExpression)n); + list.Add(se); } - else + else { - throw new InvalidOperationException( "Unexpected AST: " + n.GetType().Name + " " + new ASTPrinter().ShowAsString( n, "" ) ); + throw new InvalidOperationException("Unexpected AST: " + n.GetType().FullName + " " + new ASTPrinter().ShowAsString(n, "")); } } + return list.ToArray(); } Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2009-04-23 04:46:55 UTC (rev 4205) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2009-04-23 06:03:26 UTC (rev 4206) @@ -2468,9 +2468,14 @@ s.CreateQuery("select count(*) from Bar as bar where 1 in indices(bar.Baz.FooArray)").List(); s.CreateQuery( "select count(*) from Bar as bar where '1' in (from bar.Component.Glarch.ProxyArray g where g.Name='foo')").List(); - s.CreateQuery( - "select count(*) from Bar as bar where '1' in (from g in bar.Component.Glarch.ProxyArray.elements where g.Name='foo')") - .List(); + + // The nex query is wrong and is not present in H3.2: + // The SQL result, from Classic parser, is the same of the previous query. + // The AST parser has some problem to parse 'from g in bar.Component.Glarch.ProxyArray' + // which should be parsed as 'from bar.Component.Glarch.ProxyArray g' + //s.CreateQuery( + // "select count(*) from Bar as bar where '1' in (from g in bar.Component.Glarch.ProxyArray.elements where g.Name='foo')") + // .List(); // TODO: figure out why this is throwing an ORA-1722 error // probably the conversion ProxyArray.id (to_number ensuring a not null value) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-23 04:47:05
|
Revision: 4205 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4205&view=rev Author: fabiomaulo Date: 2009-04-23 04:46:55 +0000 (Thu, 23 Apr 2009) Log Message: ----------- line test commented as in H3.2 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs 2009-04-23 04:28:04 UTC (rev 4204) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs 2009-04-23 04:46:55 UTC (rev 4205) @@ -462,7 +462,12 @@ Assert.IsTrue(NHibernateUtil.IsInitialized(masterFromHql.Details)); dt = (Detail) s.Load(typeof(Detail), dtid); Assert.IsTrue(masterFromHql.Details.Contains(dt)); - list = s.CreateQuery("select m.id from Master m inner join fetch m.Details").List(); + + // This line is commentend in H3.2 tests because it work in the classic parser + // even if it as no sense ('join fetch' where the 'select' is a scalar) + // The AST check the case with an Exception + //list = s.CreateQuery("select m.id from Master m inner join fetch m.Details").List(); + t.Commit(); s.Close(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-23 04:28:10
|
Revision: 4204 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4204&view=rev Author: fabiomaulo Date: 2009-04-23 04:28:04 +0000 (Thu, 23 Apr 2009) Log Message: ----------- Test adapted to both translators Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/EmptyMappingsFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/EmptyMappingsFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/EmptyMappingsFixture.cs 2009-04-23 04:17:31 UTC (rev 4203) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/EmptyMappingsFixture.cs 2009-04-23 04:28:04 UTC (rev 4204) @@ -40,13 +40,20 @@ } } - [Test, ExpectedException(typeof(QueryException))] + [Test] public void InvalidQuery() { - using (ISession s = OpenSession()) + try { - s.CreateQuery("from SomeInvalidClass").List(); + using (ISession s = OpenSession()) + { + s.CreateQuery("from SomeInvalidClass").List(); + } } + catch (QueryException) + { + // + } } [Test, ExpectedException(typeof(ArgumentNullException))] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-23 04:17:54
|
Revision: 4203 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4203&view=rev Author: fabiomaulo Date: 2009-04-23 04:17:31 +0000 (Thu, 23 Apr 2009) Log Message: ----------- Bug fixed Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/LiteralProcessor.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/LiteralProcessor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/LiteralProcessor.cs 2009-04-23 03:28:22 UTC (rev 4202) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/LiteralProcessor.cs 2009-04-23 04:17:31 UTC (rev 4203) @@ -1,4 +1,5 @@ using System; +using System.Globalization; using log4net; using NHibernate.Hql.Ast.ANTLR.Tree; using NHibernate.Persister.Entity; @@ -178,11 +179,11 @@ Decimal number; try { - number = Decimal.Parse(literalValue); + number = Decimal.Parse(literalValue, NumberFormatInfo.InvariantInfo); } catch (Exception t) { - throw new HibernateException("Could not parse literal [" + text + "] as big-decimal", t); + throw new HibernateException("Could not parse literal [" + text + "] as System.Decimal.", t); } return _formatters[DECIMAL_LITERAL_FORMAT].Format(number); @@ -330,7 +331,7 @@ { public string Format(Decimal number) { - return number.ToString(); + return number.ToString(NumberFormatInfo.InvariantInfo); } } @@ -347,7 +348,7 @@ } catch (Exception t) { - throw new HibernateException("Unable to format decimal literal in approximate format [" + number.ToString() + "]", t); + throw new HibernateException("Unable to format decimal literal in approximate format [" + number.ToString(NumberFormatInfo.InvariantInfo) + "]", t); } } } Modified: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs 2009-04-23 03:28:22 UTC (rev 4202) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs 2009-04-23 04:17:31 UTC (rev 4203) @@ -2,6 +2,7 @@ using NHibernate.Hql.Ast.ANTLR; using System.Collections.Generic; using NHibernate.Util; +using NUnit.Framework; namespace NHibernate.Test.HQL.Ast { @@ -9,6 +10,14 @@ { private readonly IDictionary<string, IFilter> emptyfilters = new CollectionHelper.EmptyMapClass<string, IFilter>(); + protected override void OnSetUp() + { + if (!(sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory)) + { + Assert.Ignore("ASTQueryTranslator specific test"); + } + } + #region Overrides of TestCase protected override IList Mappings @@ -37,11 +46,5 @@ qt.Compile(null, false); return qt.SQLString; } - - protected override bool AppliesTo(Dialect.Dialect dialect) - { - return sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory; - } - } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs 2009-04-23 03:28:22 UTC (rev 4202) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs 2009-04-23 04:17:31 UTC (rev 4203) @@ -6,10 +6,10 @@ [TestFixture] public class SqlTranslationFixture : BaseFixture { - [Test, Ignore("Bug not fixed yet")] + [Test] public void ParseFloatConstant() { - var query = "select 123.5, s from SimpleClass s"; + const string query = "select 123.5, s from SimpleClass s"; Assert.That(GetSql(query), Text.StartsWith("select 123.5")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-23 03:28:40
|
Revision: 4202 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4202&view=rev Author: fabiomaulo Date: 2009-04-23 03:28:22 +0000 (Thu, 23 Apr 2009) Log Message: ----------- - Bug fix + refactoring AST qt - test to pass Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.hbm.xml trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs 2009-04-22 22:56:16 UTC (rev 4201) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs 2009-04-23 03:28:22 UTC (rev 4202) @@ -4,6 +4,7 @@ using NHibernate.Engine; using NHibernate.Hql.Ast.ANTLR.Tree; using NHibernate.Hql.Ast.ANTLR.Util; +using NHibernate.Hql.Util; using NHibernate.Persister.Collection; using NHibernate.Persister.Entity; using NHibernate.SqlCommand; @@ -251,22 +252,7 @@ /// <returns>The defined persister for this class, or null if none found.</returns> public static IQueryable FindQueryableUsingImports(ISessionFactoryImplementor sfi, string className) { - // NH : this method prevent unrecognized class when entityName != class.FullName - // this is a patch for the TODO below - var possibleResult = sfi.TryGetEntityPersister(GetEntityName(className)) as IQueryable; - if (possibleResult != null) - { - return possibleResult; - } - - string importedClassName = sfi.GetImportedClassName(className); - - if (importedClassName == null) - { - return null; - } - // NH: This method don't work if entityName != class.FullName - return (IQueryable)sfi.TryGetEntityPersister(GetEntityName(importedClassName)); + return SessionFactoryHelper.FindQueryableUsingImports(sfi, className); } private static string GetEntityName(string assemblyQualifiedName) @@ -292,24 +278,7 @@ /// <returns>The defined persister for this entity, or null if none found.</returns> private IEntityPersister FindEntityPersisterByName(string name) { - // First, try to get the persister using the given name directly. - try - { - return _sfi.GetEntityPersister( name ); - } - catch (MappingException) - { - // unable to locate it using this name - } - - // If that didn't work, try using the 'import' name. - string importedClassName = _sfi.GetImportedClassName( name ); - if ( importedClassName == null ) - { - return null; - } - - return _sfi.GetEntityPersister( importedClassName ); + return SessionFactoryHelper.FindEntityPersisterUsingImports(_sfi, name); } /// <summary> Modified: trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs 2009-04-22 22:56:16 UTC (rev 4201) +++ trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs 2009-04-23 03:28:22 UTC (rev 4202) @@ -11,21 +11,26 @@ { public static IQueryable FindQueryableUsingImports(ISessionFactoryImplementor sfi, string className) { + return FindEntityPersisterUsingImports(sfi, className) as IQueryable; + } + + public static IEntityPersister FindEntityPersisterUsingImports(ISessionFactoryImplementor sfi, string className) + { // NH : short cut - if(string.IsNullOrEmpty(className)) + if (string.IsNullOrEmpty(className)) { return null; } - - if(!char.IsLetter(className[0]) && !className[0].Equals('_')) + + if (!char.IsLetter(className[0]) && !className[0].Equals('_')) { - return null; + return null; } // NH : this method prevent unrecognized class when entityName != class.FullName // this is a patch for the TODO below - var possibleResult = sfi.TryGetEntityPersister(GetEntityName(className)) as IQueryable; - if(possibleResult != null) + var possibleResult = sfi.TryGetEntityPersister(GetEntityName(className)); + if (possibleResult != null) { return possibleResult; } @@ -37,7 +42,7 @@ return null; } // NH: This method don't work if entityName != class.FullName - return (IQueryable)sfi.TryGetEntityPersister(GetEntityName(importedClassName)); + return sfi.TryGetEntityPersister(GetEntityName(importedClassName)); } private static string GetEntityName(string assemblyQualifiedName) Added: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BaseFixture.cs 2009-04-23 03:28:22 UTC (rev 4202) @@ -0,0 +1,47 @@ +using System.Collections; +using NHibernate.Hql.Ast.ANTLR; +using System.Collections.Generic; +using NHibernate.Util; + +namespace NHibernate.Test.HQL.Ast +{ + public class BaseFixture: TestCase + { + private readonly IDictionary<string, IFilter> emptyfilters = new CollectionHelper.EmptyMapClass<string, IFilter>(); + + #region Overrides of TestCase + + protected override IList Mappings + { + get { return new string[0]; } + } + + #endregion + + protected override void Configure(Cfg.Configuration configuration) + { + var assembly = GetType().Assembly; + string mappingNamespace = GetType().Namespace; + foreach (var resource in assembly.GetManifestResourceNames()) + { + if (resource.StartsWith(mappingNamespace) && resource.EndsWith(".hbm.xml")) + { + configuration.AddResource(resource, assembly); + } + } + } + + public string GetSql(string query) + { + var qt = new QueryTranslatorImpl(null, query, emptyfilters, sessions); + qt.Compile(null, false); + return qt.SQLString; + } + + protected override bool AppliesTo(Dialect.Dialect dialect) + { + return sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory; + } + + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.cs 2009-04-23 03:28:22 UTC (rev 4202) @@ -0,0 +1,7 @@ +namespace NHibernate.Test.HQL.Ast +{ + public class SimpleClass + { + public virtual string Description { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SimpleClass.hbm.xml 2009-04-23 03:28:22 UTC (rev 4202) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.HQL.Ast"> + + <class name="SimpleClass"> + <id type="int"> + <generator class="native" /> + </id> + <property name="Description"/> + </class> +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs 2009-04-23 03:28:22 UTC (rev 4202) @@ -0,0 +1,17 @@ +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.HQL.Ast +{ + [TestFixture] + public class SqlTranslationFixture : BaseFixture + { + [Test, Ignore("Bug not fixed yet")] + public void ParseFloatConstant() + { + var query = "select 123.5, s from SimpleClass s"; + + Assert.That(GetSql(query), Text.StartsWith("select 123.5")); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-22 22:56:16 UTC (rev 4201) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-23 03:28:22 UTC (rev 4202) @@ -291,7 +291,10 @@ <Compile Include="GenericTest\SetGeneric\B.cs" /> <Compile Include="GenericTest\SetGeneric\SetGenericFixture.cs" /> <Compile Include="HQL\Animal.cs" /> + <Compile Include="HQL\Ast\BaseFixture.cs" /> <Compile Include="HQL\Ast\ParsingFixture.cs" /> + <Compile Include="HQL\Ast\SimpleClass.cs" /> + <Compile Include="HQL\Ast\SqlTranslationFixture.cs" /> <Compile Include="HQL\BaseFunctionFixture.cs" /> <Compile Include="NHSpecificTest\Dates\TimeFixture.cs" /> <Compile Include="NHSpecificTest\DtcFailures\DtcFailuresFixture.cs" /> @@ -1716,6 +1719,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="HQL\Ast\SimpleClass.hbm.xml" /> <EmbeddedResource Include="HQL\Ast\TestQueries.xml" /> <EmbeddedResource Include="HQL\Ast\TestQueriesWithResults.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1741\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 22:56:26
|
Revision: 4201 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4201&view=rev Author: fabiomaulo Date: 2009-04-22 22:56:16 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs trunk/nhibernate/src/NHibernate.Test/QueryTest/NamedParametersFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-04-22 22:12:41 UTC (rev 4200) +++ trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-04-22 22:56:16 UTC (rev 4201) @@ -661,7 +661,7 @@ hql = "select cast(7+123.3-1*a.BodyWeight as int) from Animal a group by cast(7+123.3-1*a.BodyWeight as int) having cast(7+123.3-1*a.BodyWeight as int)>0"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(129, l[0]); + Assert.AreEqual((int)(7 + 123.3 - 1 * 1.3d), l[0]); // Rendered in HAVING using a property and named param (NOT SUPPORTED) try Modified: trunk/nhibernate/src/NHibernate.Test/QueryTest/NamedParametersFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/QueryTest/NamedParametersFixture.cs 2009-04-22 22:12:41 UTC (rev 4200) +++ trunk/nhibernate/src/NHibernate.Test/QueryTest/NamedParametersFixture.cs 2009-04-22 22:56:16 UTC (rev 4201) @@ -1,6 +1,7 @@ using System; using System.Collections; using NUnit.Framework; +using NHibernate.Hql.Ast.ANTLR; namespace NHibernate.Test.QueryTest { @@ -41,16 +42,22 @@ /// Verifying that a <see langword="null" /> value passed into SetParameter(name, val) throws /// an exception /// </summary> - [Test, ExpectedException(typeof(ArgumentNullException))] + [Test] public void TestNullNamedParameter() { + if (sessions.Settings.QueryTranslatorFactory is ASTQueryTranslatorFactory) + { + Assert.Ignore("Not supported; The AST parser can guess the type."); + } ISession s = OpenSession(); try { - IQuery q = s.CreateQuery("from Simple as s where s.Name=:Name"); - q.SetParameter("Name", null); + IQuery q = s.CreateQuery("from Simple as s where s.Name=:pName"); + q.SetParameter("pName", null); + Assert.Fail("should throw if can't guess the type of parameter"); } + catch (ArgumentNullException) {} finally { s.Close(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 22:12:52
|
Revision: 4200 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4200&view=rev Author: fabiomaulo Date: 2009-04-22 22:12:41 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Fix NH-1754 and adjust of test to check exactly what we need (some RDBMS may store values in different way; for example 1.3f return 1.29999995... in MsSQL) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs 2009-04-22 19:45:48 UTC (rev 4199) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs 2009-04-22 22:12:41 UTC (rev 4200) @@ -1,5 +1,7 @@ using System; using System.Collections; +using System.Data; +using System.Xml; using NHibernate.Engine; using NHibernate.SqlCommand; using NHibernate.SqlTypes; @@ -13,15 +15,25 @@ [Serializable] public class CastFunction : ISQLFunction, IFunctionGrammar { + private LazyType returnType; #region ISQLFunction Members public IType ReturnType(IType columnType, IMapping mapping) { //note there is a weird implementation in the client side - //TODO: cast that use only costant are not supported in SELECT. Ex: cast(5 as string) - return columnType; + //TODO: cast that use only costant are not supported in SELECT. Ex: cast(5 as string) + return SetLazyType(columnType); } + private LazyType SetLazyType(IType columnType) + { + if(returnType == null) + { + returnType = new LazyType(); + } + returnType.RealType = columnType; + return returnType; + } public bool HasArguments { get { return true; } @@ -41,12 +53,13 @@ string typeName = args[1].ToString(); string sqlType; IType hqlType = TypeFactory.HeuristicType(typeName); + SetLazyType(hqlType); if (hqlType != null) { SqlType[] sqlTypeCodes = hqlType.SqlTypes(factory); if (sqlTypeCodes.Length != 1) { - throw new QueryException("invalid Hibernate type for cast()"); + throw new QueryException("invalid NHibernate type for cast(), was:" + typeName); } sqlType = factory.Dialect.GetCastTypeName(sqlTypeCodes[0]); if (sqlType == null) @@ -92,5 +105,217 @@ } #endregion + + /// <summary> + /// Delegate the values to a real type + /// </summary> + /// <remarks> + /// The real return type of Cast is know only after the Cast is parsed. + /// This class was created in NH to remove the responsibility of the parser about know the + /// real return type. + /// </remarks> + [Serializable] + private class LazyType: IType + { + public IType RealType { get; set; } + + #region Implementation of ICacheAssembler + + public object Disassemble(object value, ISessionImplementor session, object owner) + { + return RealType.Disassemble(value, session, owner); + } + + public object Assemble(object cached, ISessionImplementor session, object owner) + { + return RealType.Assemble(cached, session, owner); + } + + public void BeforeAssemble(object cached, ISessionImplementor session) + { + RealType.BeforeAssemble(cached, session); + } + + #endregion + + #region Implementation of IType + + public string Name + { + get { return RealType.Name; } + } + + public System.Type ReturnedClass + { + get { return RealType.ReturnedClass; } + } + + public bool IsMutable + { + get { return RealType.IsMutable; } + } + + public bool IsAssociationType + { + get { return RealType.IsAssociationType; } + } + + public bool IsXMLElement + { + get { return RealType.IsXMLElement; } + } + + public bool IsCollectionType + { + get { return RealType.IsCollectionType; } + } + + public bool IsComponentType + { + get { return RealType.IsComponentType; } + } + + public bool IsEntityType + { + get { return RealType.IsEntityType; } + } + + public bool IsAnyType + { + get { return RealType.IsAnyType; } + } + + public SqlType[] SqlTypes(IMapping mapping) + { + return RealType.SqlTypes(mapping); + } + + public int GetColumnSpan(IMapping mapping) + { + return RealType.GetColumnSpan(mapping); + } + + public bool IsDirty(object old, object current, ISessionImplementor session) + { + return RealType.IsDirty(old, current, session); + } + + public bool IsDirty(object old, object current, bool[] checkable, ISessionImplementor session) + { + return RealType.IsDirty(old, current, checkable, session); + } + + public bool IsModified(object oldHydratedState, object currentState, bool[] checkable, ISessionImplementor session) + { + return RealType.IsModified(oldHydratedState, currentState, checkable, session); + } + + public object NullSafeGet(IDataReader rs, string[] names, ISessionImplementor session, object owner) + { + return RealType.NullSafeGet(rs, names, session, owner); + } + + public object NullSafeGet(IDataReader rs, string name, ISessionImplementor session, object owner) + { + return RealType.NullSafeGet(rs, name, session, owner); + } + + public void NullSafeSet(IDbCommand st, object value, int index, bool[] settable, ISessionImplementor session) + { + RealType.NullSafeSet(st, value, index, settable, session); + } + + public void NullSafeSet(IDbCommand st, object value, int index, ISessionImplementor session) + { + RealType.NullSafeSet(st, value, index, session); + } + + public string ToLoggableString(object value, ISessionFactoryImplementor factory) + { + return RealType.ToLoggableString(value, factory); + } + + public object DeepCopy(object val, EntityMode entityMode, ISessionFactoryImplementor factory) + { + return RealType.DeepCopy(val, entityMode, factory); + } + + public object Hydrate(IDataReader rs, string[] names, ISessionImplementor session, object owner) + { + return RealType.Hydrate(rs, names, session, owner); + } + + public object ResolveIdentifier(object value, ISessionImplementor session, object owner) + { + return RealType.ResolveIdentifier(value, session, owner); + } + + public object SemiResolve(object value, ISessionImplementor session, object owner) + { + return RealType.SemiResolve(value, session, owner); + } + + public object Replace(object original, object target, ISessionImplementor session, object owner, IDictionary copiedAlready) + { + return RealType.Replace(original, target, session, owner, copiedAlready); + } + + public object Replace(object original, object target, ISessionImplementor session, object owner, IDictionary copyCache, ForeignKeyDirection foreignKeyDirection) + { + return RealType.Replace(original, target, session, owner, copyCache, foreignKeyDirection); + } + + public bool IsSame(object x, object y, EntityMode entityMode) + { + return RealType.IsSame(x, y, entityMode); + } + + public bool IsEqual(object x, object y, EntityMode entityMode) + { + return RealType.IsEqual(x, y, entityMode); + } + + public bool IsEqual(object x, object y, EntityMode entityMode, ISessionFactoryImplementor factory) + { + return RealType.IsEqual(x, y, entityMode, factory); + } + + public int GetHashCode(object x, EntityMode entityMode) + { + return RealType.GetHashCode(x, entityMode); + } + + public int GetHashCode(object x, EntityMode entityMode, ISessionFactoryImplementor factory) + { + return RealType.GetHashCode(x, entityMode, factory); + } + + public int Compare(object x, object y, EntityMode? entityMode) + { + return RealType.Compare(x, y, entityMode); + } + + public IType GetSemiResolvedType(ISessionFactoryImplementor factory) + { + return RealType.GetSemiResolvedType(factory); + } + + public void SetToXMLNode(XmlNode node, object value, ISessionFactoryImplementor factory) + { + RealType.SetToXMLNode(node, value, factory); + } + + public object FromXMLNode(XmlNode xml, IMapping factory) + { + return RealType.FromXMLNode(xml, factory); + } + + public bool[] ToColumnNullness(object value, IMapping mapping) + { + return RealType.ToColumnNullness(value, mapping); + } + + #endregion + } } } Modified: trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-04-22 19:45:48 UTC (rev 4199) +++ trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-04-22 22:12:41 UTC (rev 4200) @@ -3,6 +3,7 @@ using NHibernate.Dialect; using NHibernate.Dialect.Function; using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; namespace NHibernate.Test.Hql { @@ -413,13 +414,13 @@ if(!IsOracleDialect()) { hql1 = "select nullif(h.NickName, '1e1') from Human h"; - hql2 = "from Human h where nullif(h.NickName, '1e1') not is null"; + hql2 = "from Human h where not(nullif(h.NickName, '1e1') is null)"; } else { // Oracle need same specific types hql1 = "select nullif(str(h.NickName), '1e1') from Human h"; - hql2 = "from Human h where nullif(str(h.NickName), '1e1') not is null"; + hql2 = "from Human h where not (nullif(str(h.NickName), '1e1') is null)"; } // test only the parser and render using (ISession s = OpenSession()) @@ -576,18 +577,18 @@ string hql; IList l; Animal result; - + double expectedBodyWeight = 1.3; // Rendered in SELECT using a property hql = "select cast(a.BodyWeight as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3f, l[0]); + Assert.That(l[0], Is.TypeOf(typeof (double))); // Rendered in SELECT using a property in an operation with costant hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(7f + 123f - 5f * 1.3f, l[0]); + Assert.AreEqual(7 + 123 - 5 * 1.3d, l[0]); // Rendered in SELECT using a property and nested functions if (!(Dialect is Oracle8iDialect)) @@ -595,7 +596,7 @@ hql = "select cast(cast(a.BodyWeight as string) as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3F, l[0]); + Assert.That(l[0], Is.TypeOf(typeof(double))); } // TODO: Rendered in SELECT using string costant assigned with critic chars (separators) @@ -632,13 +633,13 @@ hql = "select cast(a.BodyWeight as Double) from Animal a group by cast(a.BodyWeight as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3f, l[0]); + Assert.That(l[0], Is.TypeOf(typeof(double))); // Rendered in GROUP BY using a property in an operation with costant hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a group by cast(7+123-5*a.BodyWeight as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(7f + 123f - 5f * 1.3f, l[0]); + Assert.AreEqual(7 + 123 - 5 * 1.3d, l[0]); // Rendered in GROUP BY using a property and nested functions if (!(Dialect is Oracle8iDialect)) @@ -647,14 +648,14 @@ "select cast(cast(a.BodyWeight as string) as Double) from Animal a group by cast(cast(a.BodyWeight as string) as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3F, l[0]); + Assert.That(l[0], Is.TypeOf(typeof(double))); } // Rendered in HAVING using a property hql = "select cast(a.BodyWeight as Double) from Animal a group by cast(a.BodyWeight as Double) having cast(a.BodyWeight as Double)>0"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3f, l[0]); + Assert.That(l[0], Is.TypeOf(typeof(double))); // Rendered in HAVING using a property in an operation with costants hql = "select cast(7+123.3-1*a.BodyWeight as int) from Animal a group by cast(7+123.3-1*a.BodyWeight as int) having cast(7+123.3-1*a.BodyWeight as int)>0"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 19:46:04
|
Revision: 4199 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4199&view=rev Author: fabiomaulo Date: 2009-04-22 19:45:48 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Removed TODO Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/SyntheticAndFactory.cs trunk/nhibernate/src/NHibernate/SqlCommand/InformixJoinFragment.cs trunk/nhibernate/src/NHibernate/SqlCommand/OracleJoinFragment.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/SyntheticAndFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/SyntheticAndFactory.cs 2009-04-22 19:29:26 UTC (rev 4198) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/SyntheticAndFactory.cs 2009-04-22 19:45:48 UTC (rev 4199) @@ -37,8 +37,7 @@ return; } - // TODO if (!fromElement.UseWhereFragment && !joinFragment.HasThetaJoins) - if (!fromElement.UseWhereFragment) + if (!fromElement.UseWhereFragment && !joinFragment.HasThetaJoins) { return; } Modified: trunk/nhibernate/src/NHibernate/SqlCommand/InformixJoinFragment.cs =================================================================== --- trunk/nhibernate/src/NHibernate/SqlCommand/InformixJoinFragment.cs 2009-04-22 19:29:26 UTC (rev 4198) +++ trunk/nhibernate/src/NHibernate/SqlCommand/InformixJoinFragment.cs 2009-04-22 19:45:48 UTC (rev 4199) @@ -33,7 +33,7 @@ for (int j = 0; j < fkColumns.Length; j++) { - //HasThetaJoins = true; + HasThetaJoins = true; afterWhere.Add(" and " + fkColumns[j]); afterWhere.Add("=" + alias + StringHelper.Dot + pkColumns[j]); } Modified: trunk/nhibernate/src/NHibernate/SqlCommand/OracleJoinFragment.cs =================================================================== --- trunk/nhibernate/src/NHibernate/SqlCommand/OracleJoinFragment.cs 2009-04-22 19:29:26 UTC (rev 4198) +++ trunk/nhibernate/src/NHibernate/SqlCommand/OracleJoinFragment.cs 2009-04-22 19:45:48 UTC (rev 4199) @@ -19,7 +19,7 @@ for (int j = 0; j < fkColumns.Length; j++) { - //HasThetaJoins = true; + HasThetaJoins = true; afterWhere.Add(" and " + fkColumns[j]); if (joinType == JoinType.RightOuterJoin || joinType == JoinType.FullJoin) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 19:29:33
|
Revision: 4198 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4198&view=rev Author: fabiomaulo Date: 2009-04-22 19:29:26 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Fixed NAnt files Modified Paths: -------------- trunk/nhibernate/releasenotes.txt trunk/nhibernate/src/NHibernate/NHibernate.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-04-22 19:09:39 UTC (rev 4197) +++ trunk/nhibernate/releasenotes.txt 2009-04-22 19:29:26 UTC (rev 4198) @@ -7,6 +7,7 @@ * If you want work using lazy loading with Spring.Aop now you must deploy NHibernate.ByteCode.Spring.dll * compatible only with .NET2.0 SP1 or above (System.DateTimeOffset) * In SchemaExport.Execute the parameter "format" was removed; (NH-1701) enabled configuration property format_sql (default true) + * Antlr3.Runtime.dll is required ##### Possible Breaking Changes for external frameworks ##### * ISession interface has additional methods Modified: trunk/nhibernate/src/NHibernate/NHibernate.build =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.build 2009-04-22 19:09:39 UTC (rev 4197) +++ trunk/nhibernate/src/NHibernate/NHibernate.build 2009-04-22 19:29:26 UTC (rev 4198) @@ -24,6 +24,7 @@ <include name="System.Web.dll" /> <include name="Iesi.Collections.dll" /> <include name="log4net.dll" /> + <include name="Antlr3.Runtime.dll" /> </assemblyfileset> <resourcefileset id="project.resources" prefix="NHibernate" dynamicprefix="true"> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-04-22 19:09:39 UTC (rev 4197) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-04-22 19:29:26 UTC (rev 4198) @@ -19,6 +19,7 @@ <include name="NHibernate.dll" /> <include name="LinFu.DynamicProxy.dll" /> <include name="nunit.framework.dll" /> + <include name="Antlr3.Runtime.dll" /> </assemblyfileset> <resourcefileset id="project.resources" prefix="NHibernate.Test" dynamicprefix="true"> <include name="**/*.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 19:10:07
|
Revision: 4197 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4197&view=rev Author: fabiomaulo Date: 2009-04-22 19:09:39 +0000 (Wed, 22 Apr 2009) Log Message: ----------- First approximation to integration with new AST parser Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs trunk/nhibernate/src/NHibernate/Loader/Collection/CollectionLoader.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaLoader.cs trunk/nhibernate/src/NHibernate/Loader/Custom/CustomLoader.cs trunk/nhibernate/src/NHibernate/Loader/Loader.cs trunk/nhibernate/src/NHibernate/Loader/OuterJoinLoader.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate/SqlCommand/JoinFragment.cs trunk/nhibernate/src/NHibernate/Util/ReflectHelper.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/lib/net/2.0/Antlr3.Runtime.dll trunk/nhibernate/lib/net/3.5/Antlr3.Runtime.dll trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlSqlWalker.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlLexer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlToken.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/IErrorReporter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/IParseErrorHandler.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/InvalidPathException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/InvalidWithClauseException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/QueryLoader.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/AbstractExplicitParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/AggregatedIndexCollectionSelectorParameterSpecifications.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/CollectionFilterKeyParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/DynamicFilterParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ExplicitParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/IParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/NamedParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ParameterTranslationsImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/PositionalParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QuerySyntaxException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SemanticException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/TODO.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ASTFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ASTNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ASTTreeAdaptor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractNullnessCheckNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractRestrictableStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractSelectExpression.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AggregateNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BetweenOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryArithmeticOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BooleanLiteralNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/Case2Node.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/CaseNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/CollectionFunction.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ConstructorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/CountNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/DotNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromElement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromElementFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromElementType.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromReferenceNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlSqlWalkerNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlSqlWalkerTreeAdapter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlSqlWalkerTreeNodeStream.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlTreeAdapter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IASTFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IASTNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IBinaryOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IDisplayableNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IExpectedTypeAwareNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IInitializableNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IParameterContainer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IPathNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IResolvableNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IRestrictableStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ISelectExpression.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ISessionFactoryAwareNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IUnaryOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IdentNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ImpliedFromElement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/InLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IndexNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IntoClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IsNotNullLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IsNullLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/JavaConstantNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/LiteralNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/MethodNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/OrderByClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ParameterNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/QueryNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionList.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SqlFragment.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SqlNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/UnaryArithmeticNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/UnaryLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTAppender.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTIterator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTPrinter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTUtil.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/AliasGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/CollectingNodeVisitor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ColumnHelper.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/IVisitationStrategy.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/JoinProcessor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/LiteralProcessor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/NodeTraverser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/NullableDictionary.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/PathHelper.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/SyntheticAndFactory.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/ParsingFixture.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/TestQueries.xml trunk/nhibernate/src/NHibernate.Test/HQL/Ast/TestQueriesWithResults.xml Added: trunk/nhibernate/lib/net/2.0/Antlr3.Runtime.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/2.0/Antlr3.Runtime.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Antlr3.Runtime.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Antlr3.Runtime.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using NHibernate.Engine; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// Generates translators which uses the Antlr-based parser to perform + /// the translation. + /// + /// Author: Gavin King + /// Ported by: Steve Strong + /// </summary> + public class ASTQueryTranslatorFactory : IQueryTranslatorFactory + { + public IQueryTranslator CreateQueryTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory) + { + return new QueryTranslatorImpl(queryIdentifier, queryString, filters, factory); + } + + public IFilterTranslator CreateFilterTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory) + { + return new QueryTranslatorImpl(queryIdentifier, queryString, filters, factory); + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,39 @@ +using System; +using Antlr.Runtime; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// Look ahead for tokenizing is all lowercase, whereas the original case of an input stream is preserved. + /// Copied from http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782 + ///</summary> + public class CaseInsensitiveStringStream : ANTLRStringStream + { + public CaseInsensitiveStringStream(char[] data, int numberOfActualCharsInArray) : base(data, numberOfActualCharsInArray) { } + + public CaseInsensitiveStringStream() { } + + public CaseInsensitiveStringStream(string input) : base(input) { } + + // Only the lookahead is converted to lowercase. The original case is preserved in the stream. + public override int LA(int i) + { + if (i == 0) + { + return 0; + } + + if (i < 0) + { + i++; + } + + if (((p + i) - 1) >= n) + { + return (int)CharStreamConstants.EOF; + } + + return Char.ToLowerInvariant(data[(p + i) - 1]); // This is how "case insensitive" is defined, i.e., could also use a special culture... + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using NHibernate.Persister.Collection; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// Provides a map of collection function names to the corresponding property names. + /// Authoer: josh + /// Ported by: Steve Strong + /// </summary> + public static class CollectionProperties + { + + public static Dictionary<string, string> HQL_COLLECTION_PROPERTIES; + + private static readonly string COLLECTION_INDEX_LOWER = CollectionPropertyNames.Index.ToLowerInvariant(); + + static CollectionProperties() + { + HQL_COLLECTION_PROPERTIES = new Dictionary<string, string>(); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.Elements.ToLowerInvariant(), CollectionPropertyNames.Elements); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.Indices.ToLowerInvariant(), CollectionPropertyNames.Indices); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.Size.ToLowerInvariant(), CollectionPropertyNames.Size); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MaxIndex.ToLowerInvariant(), CollectionPropertyNames.MaxIndex); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MinIndex.ToLowerInvariant(), CollectionPropertyNames.MinIndex); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MaxElement.ToLowerInvariant(), CollectionPropertyNames.MaxElement); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MinElement.ToLowerInvariant(), CollectionPropertyNames.MinElement); + HQL_COLLECTION_PROPERTIES.Add(COLLECTION_INDEX_LOWER, CollectionPropertyNames.Index); + } + + public static bool IsCollectionProperty(string name) + { + string key = name.ToLowerInvariant(); + // CollectionPropertyMapping processes everything except 'index'. + if (COLLECTION_INDEX_LOWER == key) + { + return false; + } + else + { + return HQL_COLLECTION_PROPERTIES.ContainsKey(key); + } + } + + public static string GetNormalizedPropertyName(string name) + { + return (string)HQL_COLLECTION_PROPERTIES[name]; + } + + public static bool IsAnyCollectionProperty(string name) + { + string key = name.ToLowerInvariant(); + return HQL_COLLECTION_PROPERTIES.ContainsKey(key); + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,16 @@ +using System; + +namespace NHibernate.Hql.Ast.ANTLR +{ + public class DetailedSemanticException : SemanticException + { + public DetailedSemanticException(string message) : base(message) + { + } + + public DetailedSemanticException(string message, Exception inner) + : base(message, inner) + { + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,86 @@ +using System.Collections.Generic; +using System.Text; +using Antlr.Runtime; +using log4net; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// An error handler that counts parsing errors and warnings. + /// </summary> + public class ErrorCounter : IParseErrorHandler + { + private static readonly ILog log = LogManager.GetLogger(typeof(ErrorCounter)); + private static readonly ILog hqlLog = LogManager.GetLogger("NHibernate.Hql.Parser"); + + private readonly List<string> _errorList = new List<string>(); + private readonly List<string> _warningList = new List<string>(); + private readonly List<RecognitionException> _recognitionExceptions = new List<RecognitionException>(); + + public void ReportError(RecognitionException e) + { + ReportError( e.ToString() ); + _recognitionExceptions.Add( e ); + if ( log.IsDebugEnabled ) { + log.Debug( e.ToString(), e ); + } + } + + public void ReportError(string message) + { + hqlLog.Error( message ); + _errorList.Add( message ); + } + + public int GetErrorCount() + { + return _errorList.Count; + } + + public void ReportWarning(string message) + { + hqlLog.Debug( message ); + _warningList.Add( message ); + } + + private string GetErrorString() + { + bool first = true; + StringBuilder buf = new StringBuilder(); + foreach (string error in _errorList) + { + buf.Append(error); + + if (!first) buf.Append('\n'); + + first = false; + + } + return buf.ToString(); + } + + public void ThrowQueryException() + { + if ( GetErrorCount() > 0 ) + { + if ( _recognitionExceptions.Count > 0 ) + { + throw QuerySyntaxException.Convert(_recognitionExceptions[0] ); + } + else + { + throw new QueryException( GetErrorString() ); + } + } + else + { + // all clear + if ( log.IsDebugEnabled ) + { + log.Debug( "throwQueryException() : no errors" ); + } + } + } + } + +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,4586 @@ +// $ANTLR 3.1.2 /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g 2009-04-17 11:12:37 + +// The variable 'variable' is assigned but its value is never used. +#pragma warning disable 168, 219 +// Unreachable code detected. +#pragma warning disable 162 +namespace NHibernate.Hql.Ast.ANTLR +{ + +using System; +using Antlr.Runtime; +using IList = System.Collections.IList; +using ArrayList = System.Collections.ArrayList; +using Stack = Antlr.Runtime.Collections.StackList; + +using IDictionary = System.Collections.IDictionary; +using Hashtable = System.Collections.Hashtable; + +public partial class HqlLexer : Lexer { + public const int EXPR_LIST = 73; + public const int EXISTS = 19; + public const int COMMA = 98; + public const int FETCH = 21; + public const int MINUS = 110; + public const int AS = 7; + public const int END = 56; + public const int INTO = 30; + public const int FALSE = 20; + public const int ELEMENTS = 17; + public const int THEN = 58; + public const int ALIAS = 70; + public const int ON = 60; + public const int DOT = 15; + public const int ORDER = 41; + public const int AND = 6; + public const int CONSTANT = 92; + public const int UNARY_MINUS = 88; + public const int METHOD_CALL = 79; + public const int RIGHT = 44; + public const int CONCAT = 108; + public const int PROPERTIES = 43; + public const int SELECT = 45; + public const int LE = 106; + public const int BETWEEN = 10; + public const int NUM_INT = 93; + public const int BOTH = 62; + public const int PLUS = 109; + public const int VERSIONED = 52; + public const int MEMBER = 65; + public const int UNION = 50; + public const int DISTINCT = 16; + public const int RANGE = 85; + public const int FILTER_ENTITY = 74; + public const int IDENT = 118; + public const int WHEN = 59; + public const int DESCENDING = 14; + public const int WS = 122; + public const int NEW = 37; + public const int EQ = 99; + public const int LT = 104; + public const int ESCqs = 121; + public const int OF = 67; + public const int UPDATE = 51; + public const int SELECT_FROM = 87; + public const int LITERAL_by = 54; + public const int FLOAT_SUFFIX = 124; + public const int ANY = 5; + public const int UNARY_PLUS = 89; + public const int NUM_FLOAT = 95; + public const int GE = 107; + public const int CASE = 55; + public const int OPEN_BRACKET = 113; + public const int ELSE = 57; + public const int OPEN = 100; + public const int COUNT = 12; + public const int NULL = 39; + public const int COLON = 115; + public const int DIV = 112; + public const int HAVING = 25; + public const int ALL = 4; + public const int SET = 46; + public const int INSERT = 29; + public const int TRUE = 49; + public const int CASE2 = 72; + public const int IS_NOT_NULL = 77; + public const int WHERE = 53; + public const int AGGREGATE = 69; + public const int VECTOR_EXPR = 90; + public const int LEADING = 64; + public const int CLOSE_BRACKET = 114; + public const int NUM_DOUBLE = 94; + public const int T__126 = 126; + public const int INNER = 28; + public const int QUERY = 84; + public const int ORDER_ELEMENT = 83; + public const int OR = 40; + public const int FULL = 23; + public const int INDICES = 27; + public const int IS_NULL = 78; + public const int GROUP = 24; + public const int ESCAPE = 18; + public const int T__127 = 127; + public const int PARAM = 116; + public const int ID_LETTER = 120; + public const int INDEX_OP = 76; + public const int HEX_DIGIT = 125; + public const int LEFT = 33; + public const int TRAILING = 68; + public const int JOIN = 32; + public const int NOT_BETWEEN = 80; + public const int SUM = 48; + public const int ROW_STAR = 86; + public const int OUTER = 42; + public const int NOT_IN = 81; + public const int FROM = 22; + public const int DELETE = 13; + public const int OBJECT = 66; + public const int MAX = 35; + public const int NOT_LIKE = 82; + public const int EMPTY = 63; + public const int QUOTED_String = 117; + public const int ASCENDING = 8; + public const int NUM_LONG = 96; + public const int IS = 31; + public const int SQL_NE = 103; + public const int IN_LIST = 75; + public const int WEIRD_IDENT = 91; + public const int NE = 102; + public const int GT = 105; + public const int MIN = 36; + public const int LIKE = 34; + public const int WITH = 61; + public const int IN = 26; + public const int CONSTRUCTOR = 71; + public const int SOME = 47; + public const int CLASS = 11; + public const int EXPONENT = 123; + public const int ID_START_LETTER = 119; + public const int EOF = -1; + public const int CLOSE = 101; + public const int AVG = 9; + public const int STAR = 111; + public const int NOT = 38; + public const int JAVA_CONSTANT = 97; + + // delegates + // delegators + + public HqlLexer() + { + InitializeCyclicDFAs(); + } + public HqlLexer(ICharStream input) + : this(input, null) { + } + public HqlLexer(ICharStream input, RecognizerSharedState state) + : base(input, state) { + InitializeCyclicDFAs(); + + } + + override public string GrammarFileName + { + get { return "/Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g";} + } + + // $ANTLR start "ALL" + public void mALL() // throws RecognitionException [2] + { + try + { + int _type = ALL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:9:5: ( 'all' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:9:7: 'all' + { + Match("all"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ALL" + + // $ANTLR start "ANY" + public void mANY() // throws RecognitionException [2] + { + try + { + int _type = ANY; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:10:5: ( 'any' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:10:7: 'any' + { + Match("any"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ANY" + + // $ANTLR start "AND" + public void mAND() // throws RecognitionException [2] + { + try + { + int _type = AND; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:11:5: ( 'and' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:11:7: 'and' + { + Match("and"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "AND" + + // $ANTLR start "AS" + public void mAS() // throws RecognitionException [2] + { + try + { + int _type = AS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:12:4: ( 'as' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:12:6: 'as' + { + Match("as"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "AS" + + // $ANTLR start "ASCENDING" + public void mASCENDING() // throws RecognitionException [2] + { + try + { + int _type = ASCENDING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:13:11: ( 'asc' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:13:13: 'asc' + { + Match("asc"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ASCENDING" + + // $ANTLR start "AVG" + public void mAVG() // throws RecognitionException [2] + { + try + { + int _type = AVG; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:14:5: ( 'avg' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:14:7: 'avg' + { + Match("avg"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "AVG" + + // $ANTLR start "BETWEEN" + public void mBETWEEN() // throws RecognitionException [2] + { + try + { + int _type = BETWEEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:15:9: ( 'between' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:15:11: 'between' + { + Match("between"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "BETWEEN" + + // $ANTLR start "CLASS" + public void mCLASS() // throws RecognitionException [2] + { + try + { + int _type = CLASS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:16:7: ( 'class' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:16:9: 'class' + { + Match("class"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "CLASS" + + // $ANTLR start "COUNT" + public void mCOUNT() // throws RecognitionException [2] + { + try + { + int _type = COUNT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:17:7: ( 'count' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:17:9: 'count' + { + Match("count"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "COUNT" + + // $ANTLR start "DELETE" + public void mDELETE() // throws RecognitionException [2] + { + try + { + int _type = DELETE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:18:8: ( 'delete' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:18:10: 'delete' + { + Match("delete"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "DELETE" + + // $ANTLR start "DESCENDING" + public void mDESCENDING() // throws RecognitionException [2] + { + try + { + int _type = DESCENDING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:19:12: ( 'desc' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:19:14: 'desc' + { + Match("desc"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "DESCENDING" + + // $ANTLR start "DISTINCT" + public void mDISTINCT() // throws RecognitionException [2] + { + try + { + int _type = DISTINCT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:20:10: ( 'distinct' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:20:12: 'distinct' + { + Match("distinct"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "DISTINCT" + + // $ANTLR start "ELEMENTS" + public void mELEMENTS() // throws RecognitionException [2] + { + try + { + int _type = ELEMENTS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:21:10: ( 'elements' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:21:12: 'elements' + { + Match("elements"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ELEMENTS" + + // $ANTLR start "ESCAPE" + public void mESCAPE() // throws RecognitionException [2] + { + try + { + int _type = ESCAPE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:22:8: ( 'escape' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:22:10: 'escape' + { + Match("escape"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ESCAPE" + + // $ANTLR start "EXISTS" + public void mEXISTS() // throws RecognitionException [2] + { + try + { + int _type = EXISTS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:23:8: ( 'exists' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:23:10: 'exists' + { + Match("exists"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "EXISTS" + + // $ANTLR start "FALSE" + public void mFALSE() // throws RecognitionException [2] + { + try + { + int _type = FALSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:24:7: ( 'false' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:24:9: 'false' + { + Match("false"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FALSE" + + // $ANTLR start "FETCH" + public void mFETCH() // throws RecognitionException [2] + { + try + { + int _type = FETCH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:25:7: ( 'fetch' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:25:9: 'fetch' + { + Match("fetch"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FETCH" + + // $ANTLR start "FROM" + public void mFROM() // throws RecognitionException [2] + { + try + { + int _type = FROM; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:26:6: ( 'from' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:26:8: 'from' + { + Match("from"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FROM" + + // $ANTLR start "FULL" + public void mFULL() // throws RecognitionException [2] + { + try + { + int _type = FULL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:27:6: ( 'full' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:27:8: 'full' + { + Match("full"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FULL" + + // $ANTLR start "GROUP" + public void mGROUP() // throws RecognitionException [2] + { + try + { + int _type = GROUP; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:28:7: ( 'group' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:28:9: 'group' + { + Match("group"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "GROUP" + + // $ANTLR start "HAVING" + public void mHAVING() // throws RecognitionException [2] + { + try + { + int _type = HAVING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:29:8: ( 'having' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:29:10: 'having' + { + Match("having"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "HAVING" + + // $ANTLR start "IN" + public void mIN() // throws RecognitionException [2] + { + try + { + int _type = IN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:30:4: ( 'in' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:30:6: 'in' + { + Match("in"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "IN" + + // $ANTLR start "INDICES" + public void mINDICES() // throws RecognitionException [2] + { + try + { + int _type = INDICES; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:31:9: ( 'indices' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:31:11: 'indices' + { + Match("indices"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INDICES" + + // $ANTLR start "INNER" + public void mINNER() // throws RecognitionException [2] + { + try + { + int _type = INNER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:32:7: ( 'inner' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:32:9: 'inner' + { + Match("inner"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INNER" + + // $ANTLR start "INSERT" + public void mINSERT() // throws RecognitionException [2] + { + try + { + int _type = INSERT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:33:8: ( 'insert' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:33:10: 'insert' + { + Match("insert"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INSERT" + + // $ANTLR start "INTO" + public void mINTO() // throws RecognitionException [2] + { + try + { + int _type = INTO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:34:6: ( 'into' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:34:8: 'into' + { + Match("into"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INTO" + + // $ANTLR start "IS" + public void mIS() // throws RecognitionException [2] + { + try + { + int _type = IS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:35:4: ( 'is' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:35:6: 'is' + { + Match("is"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "IS" + + // $ANTLR start "JOIN" + public void mJOIN() // throws RecognitionException [2] + { + try + { + int _type = JOIN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:36:6: ( 'join' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:36:8: 'join' + { + Match("join"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "JOIN" + + // $ANTLR start "LEFT" + public void mLEFT() // throws RecognitionException [2] + { + try + { + int _type = LEFT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:37:6: ( 'left' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:37:8: 'left' + { + Match("left"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "LEFT" + + // $ANTLR start "LIKE" + public void mLIKE() // throws RecognitionException [2] + { + try + { + int _type = LIKE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:38:6: ( 'like' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:38:8: 'like' + { + Match("like"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "LIKE" + + // $ANTLR start "MAX" + public void mMAX() // throws RecognitionException [2] + { + try + { + int _type = MAX; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:39:5: ( 'max' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:39:7: 'max' + { + Match("max"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "MAX" + + // $ANTLR start "MIN" + public void mMIN() // throws RecognitionException [2] + { + try + { + int _type = MIN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:40:5: ( 'min' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:40:7: 'min' + { + Match("min"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "MIN" + + // $ANTLR start "NEW" + public void mNEW() // throws RecognitionException [2] + { + try + { + int _type = NEW; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:41:5: ( 'new' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:41:7: 'new' + { + Match("new"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "NEW" + + // $ANTLR start "NOT" + public void mNOT() // throws RecognitionException [2] + { + try + { + int _type = NOT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:42:5: ( 'not' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:42:7: 'not' + { + Match("not"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "NOT" + + // $ANTLR start "NULL" + public void mNULL() // throws RecognitionException [2] + { + try + { + int _type = NULL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:43:6: ( 'null' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:43:8: 'null' + { + Match("null"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "NULL" + + // $ANTLR start "OR" + public void mOR() // throws RecognitionException [2] + { + try + { + int _type = OR; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:44:4: ( 'or' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:44:6: 'or' + { + Match("or"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "OR" + + // $ANTLR start "ORDER" + public void mORDER() // throws RecognitionException [2] + { + try + { + int _type = ORDER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:45:7: ( 'order' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:45:9: 'order' + { + Match("order"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ORDER" + + // $ANTLR start "OUTER" + public void mOUTER() // throws RecognitionException [2] + { + try + { + int _type = OUTER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:46:7: ( 'outer' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:46:9: 'outer' + { + Match("outer"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "OUTER" + + // $ANTLR start "PROPERTIES" + public void mPROPERTIES() // throws RecognitionException [2] + { + try + { + int _type = PROPERTIES; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:47:12: ( 'properties' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:47:14: 'properties' + { + Match("properties"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "PROPERTIES" + + // $ANTLR start "RIGHT" + public void mRIGHT() // throws RecognitionException [2] + { + try + { + int _type = RIGHT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:48:7: ( 'right' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:48:9: 'right' + { + Match("right"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "RIGHT" + + // $ANTLR start "SELECT" + public void mSELECT() // throws RecognitionException [2] + { + try + { + int _type = SELECT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:49:8: ( 'select' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:49:10: 'select' + { + Match("select"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SELECT" + + // $ANTLR start "SET" + public void mSET() // throws RecognitionException [2] + { + try + { + int _type = SET; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:50:5: ( 'set' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:50:7: 'set' + { + Match("set"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SET" + + // $ANTLR start "SOME" + public void mSOME() // throws RecognitionException [2] + { + try + { + int _type = SOME; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:51:6: ( 'some' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:51:8: 'some' + { + Match("some"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SOME" + + // $ANTLR start "SUM" + public void mSUM() // throws RecognitionException [2] + { + try + { + int _type = SUM; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:52:5: ( 'sum' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:52:7: 'sum' + { + Match("sum"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SUM" + + // $ANTLR start "TRUE" + public void mTRUE() // throws RecognitionException [2] + { + try + { + int _type = TRUE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:53:6: ( 'true' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:53:8: 'true' + { + Match("true"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "TRUE" + + // $ANTLR start "UNION" + public void mUNION() // throws RecognitionException [2] + { + try + { + int _type = UNION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:54:7: ( 'union' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:54:9: 'union' + { + Match("union"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "UNION" + + // $ANTLR start "UPDATE" + public void mUPDATE() // throws RecognitionException [2] + { + try + { + int _type = UPDATE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:55:8: ( 'update' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:55:10: 'update' + { + Match("update"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "UPDATE" + + // $ANTLR start "VERSIONED" + public void mVERSIONED() // throws RecognitionException [2] + { + try + { + int _type = VERSIONED; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:56:11: ( 'versioned' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:56:13: 'versioned' + { + Match("versioned"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "VERSIONED" + + // $ANTLR start "WHERE" + public void mWHERE() // throws RecognitionException [2] + { + try + { + int _type = WHERE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:57:7: ( 'where' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:57:9: 'where' + { + Match("where"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "WHERE" + + // $ANTLR start "LITERAL_by" + public void mLITERAL_by() // throws RecognitionException [2] + { + try + { + int _type = LITERAL_by; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:58:12: ( 'by' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:58:14: 'by' + { + Match("by"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "LITERAL_by" + + // $ANTLR start "CASE" + public void mCASE() // throws RecognitionException [2] + { + try + { + int _type = CASE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:59:6: ( 'case' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:59:8: 'case' + { + Match("case"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "CASE" + + // $ANTLR start "END" + public void mEND() // throws RecognitionException [2] + { + try + { + int _type = END; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:60:5: ( 'end' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:60:7: 'end' + { + Match("end"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "END" + + // $ANTLR start "ELSE" + public void mELSE() // throws RecognitionException [2] + { + try + { + int _type = ELSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:61:6: ( 'else' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:61:8: 'else' + { + Match("else"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ELSE" + + // $ANTLR start "THEN" + public void mTHEN() // throws RecognitionException [2] + { + try + { + int _type = THEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:62:6: ( 'then' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:62:8: 'then' + { + Match("then"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "THEN" + + // $ANTLR start "WHEN" + public void mWHEN() // throws RecognitionException [2] + { + try + { + int _type = WHEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:63:6: ( 'when' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:63:8: 'when' + { + Match("when"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "WHEN" + + // $ANTLR start "ON" + public void mON() // throws RecognitionException [2] + { + try + { + int _type = ON; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:64:4: ( 'on' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:64:6: 'on' + { + Match("on"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ON" + + // $ANTLR start "WITH" + public void mWITH() // throws RecognitionException [2] + { + try + { + int _type = WITH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:65:6: ( 'with' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:65:8: 'with' + { + Match("with"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "WITH" + + // $ANTLR start "BOTH" + public void mBOTH() // throws RecognitionException [2] ... [truncated message content] |
From: <fab...@us...> - 2009-04-22 17:17:08
|
Revision: 4196 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4196&view=rev Author: fabiomaulo Date: 2009-04-22 17:16:55 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Preparing integration with new parser Modified Paths: -------------- trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/ Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-04-22 17:10:35 UTC (rev 4195) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-04-22 17:16:55 UTC (rev 4196) @@ -1171,7 +1171,11 @@ <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> </ItemGroup> <ItemGroup> - <Folder Include="Hql\Ast\ANTLR\" /> + <Folder Include="Hql\Ast\ANTLR\Generated\" /> + <Folder Include="Hql\Ast\ANTLR\Loader\" /> + <Folder Include="Hql\Ast\ANTLR\Parameters\" /> + <Folder Include="Hql\Ast\ANTLR\Tree\" /> + <Folder Include="Hql\Ast\ANTLR\Util\" /> <Folder Include="Loader\Hql\" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-22 17:10:35 UTC (rev 4195) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-04-22 17:16:55 UTC (rev 4196) @@ -1862,6 +1862,7 @@ <EmbeddedResource Include="DynamicEntity\Tuplizer\Customer.hbm.xml" /> </ItemGroup> <ItemGroup> + <Folder Include="HQL\Ast\" /> <Folder Include="Properties\" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 17:10:45
|
Revision: 4195 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4195&view=rev Author: fabiomaulo Date: 2009-04-22 17:10:35 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Preparing integration with new parser Modified Paths: -------------- trunk/nhibernate/src/NHibernate/NHibernate.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Hql/Ast/ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-04-22 05:13:07 UTC (rev 4194) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-04-22 17:10:35 UTC (rev 4195) @@ -1171,6 +1171,7 @@ <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> </ItemGroup> <ItemGroup> + <Folder Include="Hql\Ast\ANTLR\" /> <Folder Include="Loader\Hql\" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-04-22 05:13:09
|
Revision: 4194 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4194&view=rev Author: fabiomaulo Date: 2009-04-22 05:13:07 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Fix NH-1725 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs trunk/nhibernate/src/NHibernate.Test/HQL/MaterialResource.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs 2009-04-21 19:06:39 UTC (rev 4193) +++ trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs 2009-04-22 05:13:07 UTC (rev 4194) @@ -150,7 +150,8 @@ else if (funcStack.HasFunctions) { bool constantToken = false; - if (!readyForAliasOrExpression && parenCount != funcStack.NestedFunctionCount) + var expectedParen = parenCount + ((insideNew) ? -1 : 0); + if (!readyForAliasOrExpression && expectedParen != funcStack.NestedFunctionCount) { throw new QueryException("'(' expected after HQL function in SELECT"); } Modified: trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-04-21 19:06:39 UTC (rev 4193) +++ trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-04-22 05:13:07 UTC (rev 4194) @@ -900,6 +900,19 @@ } } + [Test] + public void NH1725() + { + // Only to test the parser + using (ISession s = OpenSession()) + { + var hql = "select new ForNh1725(mr.Description, iif(mr.State= 0,1,0)) from MaterialResource mr"; + s.CreateQuery(hql).List(); + hql = "select new ForNh1725(mr.Description, cast(iif(mr.State= 0,1,0) as int)) from MaterialResource mr"; + s.CreateQuery(hql).List(); + } + } + [Test, Ignore("Not supported yet!")] public void ParameterLikeArgument() { @@ -934,4 +947,15 @@ } } } + public class ForNh1725 + { + public string Description { get; set; } + public int Value { get; set; } + + public ForNh1725(string description, int value) + { + Description = description; + Value = value; + } + } } Modified: trunk/nhibernate/src/NHibernate.Test/HQL/MaterialResource.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/MaterialResource.hbm.xml 2009-04-21 19:06:39 UTC (rev 4193) +++ trunk/nhibernate/src/NHibernate.Test/HQL/MaterialResource.hbm.xml 2009-04-22 05:13:07 UTC (rev 4194) @@ -4,7 +4,7 @@ namespace="NHibernate.Test.Hql" default-access="field.camelcase-underscore" default-lazy="true"> - + <import class="NHibernate.Test.Hql.ForNh1725, NHibernate.Test" rename="ForNh1725"/> <class name="MaterialResource"> <id name ="Id"> <generator class="native" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2009-04-21 19:06:56
|
Revision: 4193 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4193&view=rev Author: davybrion Date: 2009-04-21 19:06:39 +0000 (Tue, 21 Apr 2009) Log Message: ----------- made WeakHashtable and WeakRefWrapper serializable (NH-1750) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Util/WeakHashtable.cs trunk/nhibernate/src/NHibernate.Test/UtilityTest/WeakHashtableFixture.cs Modified: trunk/nhibernate/src/NHibernate/Util/WeakHashtable.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Util/WeakHashtable.cs 2009-04-21 18:47:14 UTC (rev 4192) +++ trunk/nhibernate/src/NHibernate/Util/WeakHashtable.cs 2009-04-21 19:06:39 UTC (rev 4193) @@ -8,6 +8,7 @@ // This class does not inherit from WeakReference but uses composition // instead to avoid requiring UnmanagedCode permission. [DebuggerTypeProxy(typeof(DictionaryProxy))] + [Serializable] public class WeakRefWrapper { private WeakReference reference; @@ -139,6 +140,7 @@ } } + [Serializable] public class WeakHashtable : IDictionary { private Hashtable innerHashtable = new Hashtable(); Modified: trunk/nhibernate/src/NHibernate.Test/UtilityTest/WeakHashtableFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/UtilityTest/WeakHashtableFixture.cs 2009-04-21 18:47:14 UTC (rev 4192) +++ trunk/nhibernate/src/NHibernate.Test/UtilityTest/WeakHashtableFixture.cs 2009-04-21 19:06:39 UTC (rev 4193) @@ -1,5 +1,8 @@ using System; using System.Collections; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; + using NHibernate.Util; using NUnit.Framework; @@ -102,5 +105,13 @@ Assert.IsFalse(new WeakRefWrapper(obj).Equals(null)); Assert.IsFalse(new WeakRefWrapper(obj).Equals(10)); } + + [Test] + public void IsSerializable() + { + WeakHashtable weakHashtable = new WeakHashtable(); + weakHashtable.Add("key", new object()); + NHAssert.IsSerializable(weakHashtable); + } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2009-04-21 18:47:21
|
Revision: 4192 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4192&view=rev Author: davybrion Date: 2009-04-21 18:47:14 +0000 (Tue, 21 Apr 2009) Log Message: ----------- applying patch from James Lanng for NH-1751 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Transform/DistinctRootEntityResultTransformer.cs Modified: trunk/nhibernate/src/NHibernate/Transform/DistinctRootEntityResultTransformer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transform/DistinctRootEntityResultTransformer.cs 2009-04-19 15:15:43 UTC (rev 4191) +++ trunk/nhibernate/src/NHibernate/Transform/DistinctRootEntityResultTransformer.cs 2009-04-21 18:47:14 UTC (rev 4192) @@ -39,7 +39,7 @@ public IList TransformList(IList list) { - IList result = new ArrayList(); + IList result = (IList)Activator.CreateInstance(list.GetType()); ISet<Identity> distinct = new HashedSet<Identity>(); for (int i = 0; i < list.Count; i++) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2009-04-19 15:15:45
|
Revision: 4191 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4191&view=rev Author: davybrion Date: 2009-04-19 15:15:43 +0000 (Sun, 19 Apr 2009) Log Message: ----------- changed the FutureBatch class to require a SessionImpl instance instead of an ISession instance Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs Modified: trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs 2009-04-19 15:06:48 UTC (rev 4190) +++ trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs 2009-04-19 15:15:43 UTC (rev 4191) @@ -12,9 +12,9 @@ protected readonly SessionImpl session; - protected FutureBatch(ISession session) + protected FutureBatch(SessionImpl session) { - this.session = (SessionImpl)session; + this.session = session; } public IList Results Modified: trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs 2009-04-19 15:06:48 UTC (rev 4190) +++ trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs 2009-04-19 15:15:43 UTC (rev 4191) @@ -4,7 +4,7 @@ { public class FutureCriteriaBatch : FutureBatch<ICriteria, IMultiCriteria> { - public FutureCriteriaBatch(ISession session) : base(session) {} + public FutureCriteriaBatch(SessionImpl session) : base(session) {} protected override IMultiCriteria CreateMultiApproach() { Modified: trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs 2009-04-19 15:06:48 UTC (rev 4190) +++ trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs 2009-04-19 15:15:43 UTC (rev 4191) @@ -4,7 +4,7 @@ { public class FutureQueryBatch : FutureBatch<IQuery, IMultiQuery> { - public FutureQueryBatch(ISession session) : base(session) {} + public FutureQueryBatch(SessionImpl session) : base(session) {} protected override IMultiQuery CreateMultiApproach() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2009-04-19 15:06:54
|
Revision: 4190 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4190&view=rev Author: davybrion Date: 2009-04-19 15:06:48 +0000 (Sun, 19 Apr 2009) Log Message: ----------- refactored duplicate code from FutureQueryBatch and FutureCriteriaBatch into a new FutureBatch base class Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs Added: trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Impl/FutureBatch.cs 2009-04-19 15:06:48 UTC (rev 4190) @@ -0,0 +1,77 @@ +using System.Collections; +using System.Collections.Generic; + +namespace NHibernate.Impl +{ + public abstract class FutureBatch<TQueryApproach, TMultiApproach> + { + private readonly List<TQueryApproach> queries = new List<TQueryApproach>(); + private readonly IList<System.Type> resultTypes = new List<System.Type>(); + private int index; + private IList results; + + protected readonly SessionImpl session; + + protected FutureBatch(ISession session) + { + this.session = (SessionImpl)session; + } + + public IList Results + { + get + { + if (results == null) + { + GetResults(); + } + return results; + } + } + + public void Add<TResult>(TQueryApproach query) + { + queries.Add(query); + resultTypes.Add(typeof(TResult)); + index = queries.Count - 1; + } + + public void Add(TQueryApproach query) + { + Add<object>(query); + } + + public IFutureValue<TResult> GetFutureValue<TResult>() + { + int currentIndex = index; + return new FutureValue<TResult>(() => GetCurrentResult<TResult>(currentIndex)); + } + + public IEnumerable<TResult> GetEnumerator<TResult>() + { + int currentIndex = index; + return new DelayedEnumerator<TResult>(() => GetCurrentResult<TResult>(currentIndex)); + } + + private void GetResults() + { + var multiApproach = CreateMultiApproach(); + for (int i = 0; i < queries.Count; i++) + { + AddTo(multiApproach, queries[i], resultTypes[i]); + } + results = GetResultsFrom(multiApproach); + ClearCurrentFutureBatch(); + } + + private IList<TResult> GetCurrentResult<TResult>(int currentIndex) + { + return (IList<TResult>)Results[currentIndex]; + } + + protected abstract TMultiApproach CreateMultiApproach(); + protected abstract void AddTo(TMultiApproach multiApproach, TQueryApproach query, System.Type resultType); + protected abstract IList GetResultsFrom(TMultiApproach multiApproach); + protected abstract void ClearCurrentFutureBatch(); + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs 2009-04-18 14:15:48 UTC (rev 4189) +++ trunk/nhibernate/src/NHibernate/Impl/FutureCriteriaBatch.cs 2009-04-19 15:06:48 UTC (rev 4190) @@ -1,62 +1,29 @@ using System.Collections; -using System.Collections.Generic; namespace NHibernate.Impl { - public class FutureCriteriaBatch + public class FutureCriteriaBatch : FutureBatch<ICriteria, IMultiCriteria> { - private readonly List<ICriteria> criterias = new List<ICriteria>(); - private readonly IList<System.Type> resultCollectionGenericType = new List<System.Type>(); + public FutureCriteriaBatch(ISession session) : base(session) {} - private int index; - private IList results; - private readonly ISession session; - - public FutureCriteriaBatch(ISession session) + protected override IMultiCriteria CreateMultiApproach() { - this.session = session; + return session.CreateMultiCriteria(); } - public IList Results + protected override void AddTo(IMultiCriteria multiApproach, ICriteria query, System.Type resultType) { - get - { - if (results == null) - { - var multiCriteria = session.CreateMultiCriteria(); - for (int i = 0; i < criterias.Count; i++) - { - multiCriteria.Add(resultCollectionGenericType[i], criterias[i]); - } - results = multiCriteria.List(); - ((SessionImpl)session).FutureCriteriaBatch = null; - } - return results; - } + multiApproach.Add(resultType, query); } - public void Add<T>(ICriteria criteria) + protected override IList GetResultsFrom(IMultiCriteria multiApproach) { - criterias.Add(criteria); - resultCollectionGenericType.Add(typeof(T)); - index = criterias.Count - 1; + return multiApproach.List(); } - public void Add(ICriteria criteria) + protected override void ClearCurrentFutureBatch() { - Add<object>(criteria); + session.FutureCriteriaBatch = null; } - - public IFutureValue<T> GetFutureValue<T>() - { - int currentIndex = index; - return new FutureValue<T>(() => (IList<T>)Results[currentIndex]); - } - - public IEnumerable<T> GetEnumerator<T>() - { - int currentIndex = index; - return new DelayedEnumerator<T>(() => (IList<T>)Results[currentIndex]); - } } } Modified: trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs 2009-04-18 14:15:48 UTC (rev 4189) +++ trunk/nhibernate/src/NHibernate/Impl/FutureQueryBatch.cs 2009-04-19 15:06:48 UTC (rev 4190) @@ -1,62 +1,29 @@ using System.Collections; -using System.Collections.Generic; namespace NHibernate.Impl { - public class FutureQueryBatch + public class FutureQueryBatch : FutureBatch<IQuery, IMultiQuery> { - private readonly List<IQuery> queries = new List<IQuery>(); - private readonly IList<System.Type> resultCollectionGenericType = new List<System.Type>(); + public FutureQueryBatch(ISession session) : base(session) {} - private int index; - private IList results; - private readonly ISession session; + protected override IMultiQuery CreateMultiApproach() + { + return session.CreateMultiQuery(); + } - public FutureQueryBatch(ISession session) - { - this.session = session; - } + protected override void AddTo(IMultiQuery multiApproach, IQuery query, System.Type resultType) + { + multiApproach.Add(resultType, query); + } - public IList Results - { - get - { - if (results == null) - { - var multiQuery = session.CreateMultiQuery(); - for (int i = 0; i < queries.Count; i++) - { - multiQuery.Add(resultCollectionGenericType[i], queries[i]); - } - results = multiQuery.List(); - ((SessionImpl)session).FutureQueryBatch = null; - } - return results; - } - } + protected override IList GetResultsFrom(IMultiQuery multiApproach) + { + return multiApproach.List(); + } - public void Add<T>(IQuery query) - { - queries.Add(query); - resultCollectionGenericType.Add(typeof(T)); - index = queries.Count - 1; + protected override void ClearCurrentFutureBatch() + { + session.FutureQueryBatch = null; } - - public void Add(IQuery query) - { - Add<object>(query); - } - - public IFutureValue<T> GetFutureValue<T>() - { - int currentIndex = index; - return new FutureValue<T>(() => (IList<T>)Results[currentIndex]); - } - - public IEnumerable<T> GetEnumerator<T>() - { - int currentIndex = index; - return new DelayedEnumerator<T>(() => (IList<T>)Results[currentIndex]); - } } } Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-04-18 14:15:48 UTC (rev 4189) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-04-19 15:06:48 UTC (rev 4190) @@ -480,6 +480,7 @@ <Compile Include="Id\SequenceIdentityGenerator.cs" /> <Compile Include="IFutureValue.cs" /> <Compile Include="Impl\DelayedEnumerator.cs" /> + <Compile Include="Impl\FutureBatch.cs" /> <Compile Include="Impl\FutureQueryBatch.cs" /> <Compile Include="Impl\FutureCriteriaBatch.cs" /> <Compile Include="Impl\FutureValue.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |