當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。