Inheritance: ISqlQueryMaker
Beispiel #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);
        }
Beispiel #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));
        }
Beispiel #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;
        }