예제 #1
0
 /// <summary>
 /// Creates a new Join Clause
 /// </summary>
 /// <param name="join">Specifies the Type of Join statement this is.</param>
 /// <param name="joiningTable">The Joining Table name</param>
 public JoinClause(SelectQueryBuilder queryBuilder, JoinType join, TableIndentifier joiningTable)
 {
     this.JoinType     = join;
     this.JoiningTable = joiningTable;
     this.Expression   = new JoinExpression(this);
     this.Query        = queryBuilder;
 }
예제 #2
0
        /// <summary>
        /// Creates a new Join clause statement fot the current query object
        /// </summary>
        protected JoinClause Join(JoinType type, string joinTable)
        {
            // Add clause to list of joins
            var table  = new TableIndentifier(joinTable, null);
            var clause = new JoinClause(this, type, table);

            Joins.Add(clause);

            // Add the table to the tables list, and then reset the LastInsertIndex
            Tables.Add(table);
            NextAliasIndex = 0;
            return(clause);
        }