Esempio n. 1
0
        /// <summary>
        /// Returns a new instance with exactly the same properties
        /// </summary>
        /// <returns></returns>
        public new UpdateQuery Clone()
        {
            UpdateQuery query = new UpdateQuery(connection: Connection, timeout: Timeout);

            /// From BaseQuery
            if (FromTable != null)
            {
                query.FromTable = FromTable;
            }
            else
            {
                query.FromQuery = FromQuery;
            }

            query.WhereCondition = WhereCondition;
            query.ListJoin       = ListJoin;
            query.Alias          = Alias;

            /// From UpdateQuery
            query.UpdateColumns = UpdateColumns;
            query.UpdateTable   = UpdateTable;

            return(query);
        }
        public InsertQueryBuilder ElseUpdate(UpdateQuery updateQuery)
        {
            Query.ElseUpdateQuery = updateQuery;

            return(this);
        }