Esempio n. 1
0
        public void IntersectAllTest()//TODO: Relook into the keyword for INTERSECT ALL
        {
            SqlSelect s1 = SqlDml.Select(SqlDml.TableRef(Catalog.DefaultSchema.Tables["address"]));

            s1.Columns.Add(SqlDml.Asterisk);
            SqlSelect s2 = SqlDml.Select(SqlDml.TableRef(Catalog.DefaultSchema.Tables["address"]));

            s2.Columns.Add(SqlDml.Asterisk);
            SqlSelect s3 = SqlDml.Select(SqlDml.TableRef(Catalog.DefaultSchema.Tables["address"]));

            s3.Columns.Add(SqlDml.Asterisk);

            Console.WriteLine(SqlDriver.Compile(s1.IntersectAll(s2)).GetCommandText());
            Console.WriteLine(SqlDriver.Compile(s1.IntersectAll(s2).IntersectAll(s3)).GetCommandText());
            Console.WriteLine(SqlDriver.Compile(s1.IntersectAll(s2.IntersectAll(s3))).GetCommandText());
            Console.WriteLine(SqlDriver.Compile(SqlDml.IntersectAll(s1, s2)).GetCommandText());
            Console.WriteLine(SqlDriver.Compile(SqlDml.IntersectAll(s1, s1.IntersectAll(s2))).GetCommandText());
            Console.WriteLine(SqlDriver.Compile(SqlDml.IntersectAll(s1.IntersectAll(s2), s1)).GetCommandText());
            Console.WriteLine(SqlDriver.Compile(SqlDml.IntersectAll(s1.IntersectAll(s2), s1.IntersectAll(s2))).GetCommandText());
        }
Esempio n. 2
0
        public void IntersectAllTest()
        {
            SqlSelect s1 = SqlDml.Select(SqlDml.TableRef(Catalog.Schemas["Person"].Tables["Address"]));

            s1.Columns.Add(SqlDml.Asterisk);
            SqlSelect s2 = SqlDml.Select(SqlDml.TableRef(Catalog.Schemas["Person"].Tables["Address"]));

            s2.Columns.Add(SqlDml.Asterisk);
            SqlSelect s3 = SqlDml.Select(SqlDml.TableRef(Catalog.Schemas["Person"].Tables["Address"]));

            s3.Columns.Add(SqlDml.Asterisk);

            Console.WriteLine(sqlDriver.Compile(s1.IntersectAll(s2)).GetCommandText());
            Console.WriteLine(sqlDriver.Compile(s1.IntersectAll(s2).IntersectAll(s3)).GetCommandText());
            Console.WriteLine(sqlDriver.Compile(s1.IntersectAll(s2.IntersectAll(s3))).GetCommandText());
            Console.WriteLine(sqlDriver.Compile(SqlDml.IntersectAll(s1, s2)).GetCommandText());
            Console.WriteLine(sqlDriver.Compile(SqlDml.IntersectAll(s1, s1.IntersectAll(s2))).GetCommandText());
            Console.WriteLine(sqlDriver.Compile(SqlDml.IntersectAll(s1.IntersectAll(s2), s1)).GetCommandText());
            Console.WriteLine(sqlDriver.Compile(SqlDml.IntersectAll(s1.IntersectAll(s2), s1.IntersectAll(s2))).GetCommandText());
        }
Esempio n. 3
0
 public SqlQueryExpression IntersectAll(ISqlQueryExpression operand)
 {
     return(SqlDml.IntersectAll(this, operand));
 }