Example #1
0
        public Join()
        {
            Condition = new CriteriaExpression( null );

            _joinMap = new Dictionary<JoinType, string>
            {
                { JoinType.Join, "JOIN" },
                { JoinType.InnerJoin, "INNER JOIN" },
                { JoinType.LeftJoin, "LEFT JOIN" },
                { JoinType.LeftOuterJoin, "LEFT OUTER JOIN" },
                { JoinType.RightJoin, "RIGHT JOIN" },
                { JoinType.RightOuterJoin, "RIGHT OUTER JOIN" },
                { JoinType.FullJoin, "FULL JOIN" },
                { JoinType.FullOuterJoin, "FULL OUTER JOIN" },
                { JoinType.CrossJoin, "CROSS JOIN" }
            };
            TableHints = new List<TableHint>();
        }
Example #2
0
        private Expression ReadCriteriaList( Expression parent )
        {
            Expression expression = ReadCriteria( parent );

            if ( Tokenizer.IsNextToken( "AND", "OR" ) )
            {
                CriteriaExpression result = new CriteriaExpression( parent );
                result.Left = expression;

                result.Operator = CurrentToken;
                ReadNextToken();

                result.Right = ReadCriteriaList( result );

                return result;
            }
            else
                return expression;
        }
Example #3
0
        protected CriteriaExpression ProcessCriteriaExpression( Expression parent )
        {
            CriteriaExpression expression = new CriteriaExpression( parent );
            expression.Left = ProcessExpression();
            expression.Operator = GetOperator();
            expression.Right = ProcessExpression();

            return expression;
        }
Example #4
0
        private CriteriaExpression ProcessCriteria( Expression parent, Expression expression )
        {
            CriteriaExpression result = new CriteriaExpression( parent );
            result.Left = expression;

            result.Operator = CurrentToken;
            ReadNextToken();

            result.Right = ReadExpression( parent );

            return result;
        }