Beispiel #1
0
            public WhenCallingCombine_WithAnTwoSqlQueries_AndAnSqlQueryIsForAStoredProcedure()
            {
                this.sqlQuery1 = new SqlQuery("SELECT `Column1`, `Column2`, `Column3` FROM `dbo`.`Table1` WHERE `Column1` = @p0 AND `Column2` > @p1", "Foo", 100);
                this.sqlQuery2 = new SqlQuery("CALL CustomersByStatus @StatusId", 2);

                var dbDriver = new MySqlDbDriver();

                this.combinedQuery = dbDriver.Combine(this.sqlQuery1, this.sqlQuery2);
            }
Beispiel #2
0
            public WhenCallingCombine_WithTwoSqlQueries()
            {
                this.sqlQuery1         = new SqlQuery("SELECT `Column1`, `Column2`, `Column3` FROM `dbo`.`Table1` WHERE `Column1` = @p0 AND `Column2` > @p1", "Foo", 100);
                this.sqlQuery1.Timeout = 38;

                this.sqlQuery2         = new SqlQuery("SELECT `Column_1`, `Column_2` FROM `dbo`.`Table_2` WHERE (`Column_1` = @p0 OR @p0 IS NULL) AND `Column_2` < @p1", "Bar", -1);
                this.sqlQuery2.Timeout = 42;

                var dbDriver = new MySqlDbDriver();

                this.combinedQuery = dbDriver.Combine(this.sqlQuery1, this.sqlQuery2);
            }