/// <summary>
        /// 输出连接语句
        /// </summary>
        /// <returns>连接语句</returns>
        public override String ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(SqlJoinTypes.InternalGetTypeName(this._joinType)).Append(' ').Append(this._anotherTableName).Append(" ON ");
            sb.Append(this._currentTableName).Append('.').Append(this._currentTableKeyField).Append(" = ");
            sb.Append(this._anotherTableName).Append('.').Append(this._anotherTableKeyField);

            return(sb.ToString());
        }
Beispiel #2
0
        /// <summary>
        /// 输出连接语句
        /// </summary>
        /// <returns>连接语句</returns>
        public override String ToString()
        {
            if (this._anotherTableCommand == null)
            {
                return(String.Empty);
            }

            StringBuilder sb = new StringBuilder();

            String anotherTableName    = String.Format("TBL_{0}", this._anotherTableIndentity);
            String anotherTableContent = this._anotherTableCommand.ToString(anotherTableName);

            sb.Append(SqlJoinTypes.InternalGetTypeName(this._joinType)).Append(' ').Append(this._anotherTableCommand.ToString(anotherTableName)).Append(" ON ");
            sb.Append(this._currentTableName).Append('.').Append(this._currentTableKeyField).Append(" = ");
            sb.Append(anotherTableName).Append('.').Append(this._anotherTableKeyField);

            return(sb.ToString());
        }
Beispiel #3
0
        /// <summary>
        /// 获取连接语句内容
        /// </summary>
        /// <returns>连接语句内容</returns>
        public override String GetClauseText()
        {
            if (this._anotherTableCommand == null)
            {
                return(String.Empty);
            }

            StringBuilder sb = new StringBuilder();

            String anotherTableName    = "TBL_" + this._anotherTableIdentity;
            String anotherTableContent = this._anotherTableCommand.GetCommandText(anotherTableName);

            sb.Append(SqlJoinTypes.InternalGetTypeName(this._joinType)).Append(' ').Append(this._anotherTableCommand.GetCommandText(anotherTableName)).Append(" ON ");
            sb.Append(this._currentTableName).Append('.').Append(this._currentTableKeyField).Append(" = ");
            sb.Append(anotherTableName).Append('.').Append(this._anotherTableKeyField);

            return(sb.ToString());
        }