当前位置: 首页>>代码示例>>C#>>正文


C# JoinSequence.ToJoinFragment方法代码示例

本文整理汇总了C#中NHibernate.Engine.JoinSequence.ToJoinFragment方法的典型用法代码示例。如果您正苦于以下问题:C# JoinSequence.ToJoinFragment方法的具体用法?C# JoinSequence.ToJoinFragment怎么用?C# JoinSequence.ToJoinFragment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NHibernate.Engine.JoinSequence的用法示例。


在下文中一共展示了JoinSequence.ToJoinFragment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateCollectionSubquery

		public static string CreateCollectionSubquery(
			JoinSequence joinSequence,
			IDictionary enabledFilters,
			String[] columns)
		{
			try
			{
				JoinFragment join = joinSequence.ToJoinFragment(enabledFilters, true);
				return new StringBuilder()
					.Append("select ")
					.Append(StringHelper.Join(", ", columns))
					.Append(" from ")
					.Append(join.ToFromFragmentString.Substring(2)) // remove initial ", "
					.Append(" where ")
					.Append(join.ToWhereFragmentString.Substring(5)) // remove initial " and "
					.ToString();
			}
			catch (MappingException me)
			{
				throw new QueryException(me);
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:22,代码来源:CollectionSubqueryFactory.cs

示例2: AddJoin

		private void AddJoin(JoinSequence joinSequence, QueryTranslator q)
		{
			q.AddFromJoinOnly(pathExpressionParser.Name, joinSequence);
			try
			{
				AddToCurrentJoin(joinSequence.ToJoinFragment(q.EnabledFilters, true).ToWhereFragmentString);
			}
			catch (MappingException me)
			{
				throw new QueryException(me);
			}
		}
开发者ID:nikson,项目名称:nhibernate-core,代码行数:12,代码来源:WhereParser.cs

示例3: AddJoinNodes

		private void AddJoinNodes(QueryNode query, JoinSequence join, FromElement fromElement) 
		{
			JoinFragment joinFragment = join.ToJoinFragment(
					_walker.EnabledFilters,
					fromElement.UseFromFragment || fromElement.IsDereferencedBySuperclassOrSubclassProperty,
					fromElement.WithClauseFragment,
					fromElement.WithClauseJoinAlias
			);

			SqlString frag = joinFragment.ToFromFragmentString;
			SqlString whereFrag = joinFragment.ToWhereFragmentString;

			// If the from element represents a JOIN_FRAGMENT and it is
			// a theta-style join, convert its type from JOIN_FRAGMENT
			// to FROM_FRAGMENT
			if ( fromElement.Type == HqlSqlWalker.JOIN_FRAGMENT &&
					( join.IsThetaStyle || SqlStringHelper.IsNotEmpty( whereFrag ) ) ) 
			{
				fromElement.Type = HqlSqlWalker.FROM_FRAGMENT;
				fromElement.JoinSequence.SetUseThetaStyle( true ); // this is used during SqlGenerator processing
			}

			// If there is a FROM fragment and the FROM element is an explicit, then add the from part.
			if ( fromElement.UseFromFragment /*&& StringHelper.isNotEmpty( frag )*/ ) 
			{
				SqlString fromFragment = ProcessFromFragment( frag, join ).Trim();
				if ( log.IsDebugEnabled ) 
				{
					log.Debug( "Using FROM fragment [" + fromFragment + "]" );
				}

				ProcessDynamicFilterParameters(fromFragment,fromElement,_walker);
			}

			_syntheticAndFactory.AddWhereFragment( 
					joinFragment,
					whereFrag,
					query,
					fromElement,
					_walker
			);
		}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:42,代码来源:JoinProcessor.cs


注:本文中的NHibernate.Engine.JoinSequence.ToJoinFragment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。