コード例 #1
0
 protected virtual bool CompareMListElement(MListElementExpression a, MListElementExpression b)
 {
     return(a.Table == b.Table &&
            Compare(a.RowId, b.RowId) &&
            Compare(a.Element, b.Element) &&
            Compare(a.Order, b.Order) &&
            Compare(a.Parent, b.Parent));
 }
コード例 #2
0
        protected internal virtual Expression VisitMListElement(MListElementExpression mle)
        {
            var rowId   = (PrimaryKeyExpression)Visit(mle.RowId);
            var parent  = (EntityExpression)Visit(mle.Parent);
            var order   = Visit(mle.Order);
            var element = Visit(mle.Element);

            if (rowId != mle.RowId || parent != mle.Parent || order != mle.Order || element != mle.Element)
            {
                return(new MListElementExpression(rowId, parent, order, element, mle.Table));
            }
            return(mle);
        }
コード例 #3
0
            protected internal override Expression VisitMListElement(MListElementExpression mle)
            {
                Type type = mle.Type;

                var bindings = new List <MemberAssignment>
                {
                    Expression.Bind(type.GetProperty("RowId"), Visit(mle.RowId.UnNullify())),
                    Expression.Bind(type.GetProperty("Parent"), Visit(mle.Parent)),
                };

                if (mle.Order != null)
                {
                    bindings.Add(Expression.Bind(type.GetProperty("Order"), Visit(mle.Order)));
                }

                bindings.Add(Expression.Bind(type.GetProperty("Element"), Visit(mle.Element)));

                var init = Expression.MemberInit(Expression.New(type), bindings);

                return(Expression.Condition(SmartEqualizer.NotEqualNullable(Visit(mle.RowId.Nullify()), NullId),
                                            init,
                                            Expression.Constant(null, init.Type)));
            }
コード例 #4
0
 protected internal override Expression VisitMListElement(MListElementExpression mle)
 {
     throw InvalidSqlExpression(mle);
 }
コード例 #5
0
 protected virtual Expression VisitMListElement(MListElementExpression mle)
 {
     var rowId = Visit(mle.RowId);
     var parent = (EntityExpression)Visit(mle.Parent);
     var element = Visit(mle.Element);
     if (rowId != mle.RowId || parent != mle.Parent || element != mle.Parent)
         return new MListElementExpression(rowId, parent, element, mle.Table);
     return mle;
 }
コード例 #6
0
ファイル: QueryFormatter.cs プロジェクト: nuub666/framework
 protected override Expression VisitMListElement(MListElementExpression mle)
 {
     throw InvalidSqlExpression(mle);
 }