Пример #1
0
        private void AddExtraJoins(JoinFragment joinFragment, string alias, IJoinable joinable, bool innerJoin)
        {
            bool include = IsIncluded(alias);

            joinFragment.AddJoins(joinable.FromJoinFragment(alias, innerJoin, include),
                                  joinable.WhereJoinFragment(alias, innerJoin, include));
        }
Пример #2
0
        private void AddSubclassJoins(JoinFragment joinFragment, String alias, IJoinable joinable, bool innerJoin, bool includeSubclassJoins)
        {
            bool include = includeSubclassJoins && IsIncluded(alias);

            joinFragment.AddJoins(joinable.FromJoinFragment(alias, innerJoin, include),
                                  joinable.WhereJoinFragment(alias, innerJoin, include));
        }
        private static SqlString GetWhereJoinFragment(IJoinable persister, string tableAlias)
        {
            SqlString whereJoinFragment = persister.WhereJoinFragment(tableAlias, true, false);

            if (whereJoinFragment == null)
            {
                whereJoinFragment = SqlString.Empty;
            }
            else
            {
                whereJoinFragment = whereJoinFragment.Trim();
                if (whereJoinFragment.StartsWithCaseInsensitive("and "))
                {
                    whereJoinFragment = whereJoinFragment.Substring(4);
                }
            }
            return(whereJoinFragment);
        }
Пример #4
0
 public void AddJoins(JoinFragment outerjoin)
 {
     outerjoin.AddJoin(joinable.TableName, rhsAlias, lhsColumns, rhsColumns, joinType, on);
     outerjoin.AddJoins(joinable.FromJoinFragment(rhsAlias, false, true),
                        joinable.WhereJoinFragment(rhsAlias, false, true));
 }
		private static SqlString GetWhereJoinFragment(IJoinable persister, string tableAlias)
		{
			SqlString whereJoinFragment = persister.WhereJoinFragment(tableAlias, true, false);
			if (whereJoinFragment == null)
			{
				whereJoinFragment = SqlString.Empty;
			}
			else
			{
				whereJoinFragment = whereJoinFragment.Trim();
				if (whereJoinFragment.StartsWithCaseInsensitive("and "))
				{
					whereJoinFragment = whereJoinFragment.Substring(4);
				}
			}
			return whereJoinFragment;
		}
Пример #6
0
		private void AddExtraJoins(JoinFragment joinFragment, string alias, IJoinable joinable, bool innerJoin)
		{
			bool include = IsIncluded(alias);
			joinFragment.AddJoins(joinable.FromJoinFragment(alias, innerJoin, include),
			                      joinable.WhereJoinFragment(alias, innerJoin, include));
		}