Example #1
0
        /// <summary>
        /// Adds a UNION ALL clause to the query, which is used to combine the results of two or more
        /// SELECT statements and it does not remove duplicate rows between the various SELECT statements.
        /// </summary>
        /// <param name="query">The query to compound in this query statement</param>
        /// <returns>Returns this instance of <see cref="SelectQueryBuilder"/></returns>
        public SelectQueryBuilder UnionAll(SelectQueryBuilder query)
        {
            var statement = new UnionStatement()
            {
                Type  = UnionType.UnionAll,
                Query = query
            };

            Unions.Add(statement);
            return(this);
        }
Example #2
0
        /// <summary>
        /// Adds an INTERSECT operator to the query, which returns the intersection of 2 or more datasets
        /// </summary>
        /// <param name="query">The query to compound in this query statement</param>
        /// <returns>Returns this instance of <see cref="SelectQueryBuilder"/></returns>
        public SelectQueryBuilder Intersect(SelectQueryBuilder query)
        {
            var statement = new UnionStatement()
            {
                Type  = UnionType.Intersect,
                Query = query
            };

            Unions.Add(statement);
            return(this);
        }
Example #3
0
 /// <summary>
 /// Creates a new instance of <see cref="SelectWhereStatement"/> using the quoting settings
 /// from the supplied SelectQueryBuilder
 /// </summary>
 /// <param name="query"></param>
 public SelectWhereStatement(SelectQueryBuilder query) : this()
 {
     this.Query         = query;
     AttributeQuoteMode = query.Context.IdentifierQuoteMode;
     AttributeQuoteKind = query.Context.IdentifierQuoteKind;
 }