protected override System.Linq.Expressions.Expression HandleOBJECT_ID(System.Linq.Expressions.MethodCallExpression m)
 {
     this._strSql.Append("(");
     this.Visit(m.Arguments[0]);
     this._strSql.Append(" " + DMSOperators.FormatBinaryOperator(System.Linq.Expressions.ExpressionType.Equal) + " ");
     this._strSql.Append(this.Provider.OBJECT_ID);
     this._strSql.Append("(");
     this.Visit(m.Arguments[1]);
     this._strSql.Append("))");
     return(m);
 }
Esempio n. 2
0
 protected override System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression b)
 {
     this._CurrentMemberInfo = null;
     this._strSql.Append("(");
     this.Visit(b.Left);
     this._LastestOperator = new System.Linq.Expressions.ExpressionType?(b.NodeType);
     this._strSql.Append(" " + DMSOperators.FormatBinaryOperator(this._LastestOperator) + " ");
     this.Visit(b.Right);
     this._strSql.Append(")");
     return(b);
 }
Esempio n. 3
0
 protected override System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression b)
 {
     this.Visit(b.Left);
     if (this.ExcuteType == DMSExcuteType.SELECT ||
         this.ExcuteType == DMSExcuteType.UPDATE ||
         this.ExcuteType == DMSExcuteType.UPDATE_WHERE)
     {
         this._LastestOperator = new System.Linq.Expressions.ExpressionType?(b.NodeType);
         this._strSql.Append(" " + DMSOperators.FormatBinaryOperator(this._LastestOperator) + " ");
     }
     else if (this.ExcuteType == DMSExcuteType.INSERT_SELECT)
     {
         this._LastestOperator = new System.Linq.Expressions.ExpressionType?(b.NodeType);
         this._ParamSql.Append(" " + DMSOperators.FormatBinaryOperator(this._LastestOperator) + " ");
     }
     this.Visit(b.Right);
     return(b);
 }
Esempio n. 4
0
        protected override System.Linq.Expressions.MemberBinding VisitBinding(System.Linq.Expressions.MemberBinding binding)
        {
            if ((this.ExcuteType == DMSExcuteType.UPDATE ||
                 this.ExcuteType == DMSExcuteType.INSERT ||
                 this.ExcuteType == DMSExcuteType.INSERTIDENTITY ||
                 this.ExcuteType == DMSExcuteType.INSERT_SELECT ||
                 this.ExcuteType == DMSExcuteType.UPDATE_WHERE) && binding.BindingType == System.Linq.Expressions.MemberBindingType.Assignment)
            {
                string     text       = string.Empty;
                MemberInfo memberInfo = binding.Member;
                this._CurrentMemberInfo = memberInfo;
                if (this.ExcuteType == DMSExcuteType.UPDATE_WHERE)
                {
                    var lastTableKey = this.TableKeys.Where(q => q.AssemblyQualifiedName == memberInfo.DeclaringType.AssemblyQualifiedName).LastOrDefault();
                    if (lastTableKey != null)
                    {
                        text = lastTableKey.TableSpecialName;
                        if (this.SplitExpression.TableMapping.TokenFlag == true)
                        {
                            text = this.Provider.BuildColumnName(text);
                        }
                        this._strSql.Append(text);
                        this._strSql.Append(this.Provider.TableToken);
                    }
                }

                text = GetMemberInfoName(memberInfo.Name);

                if (this.SplitExpression.TableMapping.TokenFlag == true)
                {
                    text = this.Provider.BuildColumnName(text);
                }
                this._strSql.Append(text);
                if (this.ExcuteType == DMSExcuteType.UPDATE || this.ExcuteType == DMSExcuteType.UPDATE_WHERE)
                {
                    this._ParamSql.Append(text);
                    this._strSql.Append(DMSOperators.FormatBinaryOperator(System.Linq.Expressions.ExpressionType.Equal));
                }
            }
            return(base.VisitBinding(binding));
        }