Пример #1
0
        protected JoinView(View left, JoinType joinType, View right, Expression joinKey)
        {
            left.ThrowIfNullArgument(nameof(left));
            right.ThrowIfNullArgument(nameof(right));
            joinType.ThrowIfEnumOutOfRange();
            joinKey.ThrowIfNullArgument(nameof(joinKey));

            _left = left;
            _right = right;
            _joinType = joinType;
            _joinKey = joinKey;

            this._viewType = ViewType.Join;
        }
Пример #2
0
        protected JoinView(View left, JoinType joinType, View right, Expression joinKey)
        {
            left.ThrowIfNullArgument(nameof(left));
            right.ThrowIfNullArgument(nameof(right));
            joinType.ThrowIfEnumOutOfRange();
            joinKey.ThrowIfNullArgument(nameof(joinKey));

            _left     = left;
            _right    = right;
            _joinType = joinType;
            _joinKey  = joinKey;

            this._viewType = ViewType.Join;
        }
Пример #3
0
        public string GetJoinKeyword(JoinType joinType)
        {
            joinType.ThrowIfEnumOutOfRange();

            switch (joinType)
            {
            case JoinType.Inner:
                return(" INNER JOIN ");

            case JoinType.Left:
                return(" LEFT JOIN ");

            case JoinType.Right:
                return(" RIGHT JOIN ");

            case JoinType.Outer:
                return(" OUTER JOIN ");

            default:
                return(string.Empty);
            }
        }
Пример #4
0
        public string GetJoinKeyword(JoinType joinType)
        {
            joinType.ThrowIfEnumOutOfRange();

            switch (joinType)
            {
                case JoinType.Inner:
                    return " JOIN ";

                case JoinType.Left:
                    return " LEFT JOIN ";

                case JoinType.Right:
                    return " RIGHT JOIN ";

                case JoinType.Outer:
                    return " OUTER JOIN ";

                default:
                    return string.Empty;
            }
        }