상속: ISqlQueryMaker
예제 #1
0
        /// <summary>
        /// Returns a deep copy of this object
        /// </summary>
        /// <returns></returns>
        protected SqlQueryMaker CloneImpl()
        {
            SqlQueryMaker newQuery = new SqlQueryMaker();

            newQuery.QueryType   = QueryType;
            newQuery._TableName  = _TableName;
            newQuery._PrimaryKey = _PrimaryKey;
            newQuery._Select     = _Select;
            newQuery._From       = _From;
            newQuery.GroupBy     = GroupBy;
            newQuery.Having      = Having;
            newQuery.FirstRow    = FirstRow;
            newQuery.TotalRows   = TotalRows;

            if (_orderByClause != null)
            {
                newQuery.OrderBy = OrderBy.Clone();
            }
            if (_whereClause != null)
            {
                newQuery.Where = Where.Clone();
            }
            if (_sqlFieldMap.IsValueCreated)
            {
                newQuery.AddFieldMap(sqlFieldMap);
            }
            if (HasParameters)
            {
                newQuery.AddParameter(ParameterList.Clone());
            }
            newQuery.Clean();
            return(newQuery);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            SqlQueryMaker other = obj as SqlQueryMaker;

            return(other != null &&
                   other.GetQuery() == GetQuery() &&
                   (HasParameters == other.HasParameters) &&
                   (
                       HasParameters ?
                       _ParameterList == other._ParameterList :
                       true));
        }
예제 #3
0
        /// <summary>
        /// Returns a deep copy of this object
        /// </summary>
        /// <returns></returns>
        protected SqlQueryMaker CloneImpl()
        {
            SqlQueryMaker newQuery = new SqlQueryMaker();

            newQuery.QueryType = QueryType;
            newQuery._TableName = _TableName;
            newQuery._PrimaryKey = _PrimaryKey;
            newQuery._Select = _Select;
            newQuery._From = _From;
            newQuery.GroupBy = GroupBy;
            newQuery.Having = Having;
            newQuery.FirstRow = FirstRow;
            newQuery.TotalRows = TotalRows;

            if (_orderByClause != null)
            {
                newQuery.OrderBy = OrderBy.Clone();
            }
            if (_whereClause != null)
            {
                newQuery.Where = Where.Clone();
            }
            if (_sqlFieldMap.IsValueCreated)
            {
                newQuery.AddFieldMap(sqlFieldMap);
            }
            if (HasParameters)
            {
                newQuery.AddParameter(ParameterList.Clone());
            }
            newQuery.Clean();
            return newQuery;
        }