Beispiel #1
0
        public void On(QJoinCondition @on)
        {
            if (_jump)
            {
                _jump = false; return;
            }
            var jc     = (QJoinCondition)@on;
            var index1 = _tables.IndexOf(jc.leftColumn._table);

            if (index1 < 0)
            {
                throw new ArgumentException("on 参数无效");
            }
            var index2 = _tables.IndexOf(jc.rightColumn._table);

            if (index2 < 0)
            {
                throw new ArgumentException("on 参数无效");
            }
            if (index1 > index2)
            {
                jc.leftColumn._table._joinCondition = @on;
            }
            else
            {
                jc.rightColumn._table._joinCondition = @on;
            }
        }
 public void InnerJoin(QTable table, QJoinCondition @on)
 {
     if (_jump)
     {
         _jump = false; return;
     }
     AddTable(table);
     table._joinType      = JoinType.Inner;
     table._joinCondition = @on;
 }
Beispiel #3
0
 public void FullJoin(QTable table, QJoinCondition @on)
 {
     if (_jump)
     {
         _jump = false; return;
     }
     this.AddTable(table);
     table._joinType      = JoinType.Full;
     table._joinCondition = @on;
 }
 public void Join(QTable table, JoinType joinType, QJoinCondition @on)
 {
     if (_jump)
     {
         _jump = false; return;
     }
     AddTable(table);
     table._joinType      = joinType;
     table._joinCondition = @on;
 }