本文整理匯總了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);
}
}
示例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);
}
}
示例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
);
}