@@ -564,7 +564,7 @@ def connect *args
564
564
end
565
565
566
566
it "should raise an exception when one of multiple statements fails" do
567
- result = @multi_client . query ( "SELECT 1 as 'set_1'; SELECT * FROM invalid_table_name;SELECT 2 as 'set_2';" )
567
+ result = @multi_client . query ( "SELECT 1 AS 'set_1'; SELECT * FROM invalid_table_name; SELECT 2 AS 'set_2';" )
568
568
result . first [ 'set_1' ] . should be ( 1 )
569
569
lambda {
570
570
@multi_client . next_result
@@ -573,7 +573,7 @@ def connect *args
573
573
end
574
574
575
575
it "returns multiple result sets" do
576
- @multi_client . query ( "select 1 as 'set_1'; select 2 as 'set_2'") . first . should eql ( { 'set_1' => 1 } )
576
+ @multi_client . query ( "SELECT 1 AS 'set_1'; SELECT 2 AS 'set_2'") . first . should eql ( { 'set_1' => 1 } )
577
577
578
578
@multi_client . next_result . should be_true
579
579
@multi_client . store_result . first . should eql ( { 'set_2' => 2 } )
@@ -582,12 +582,12 @@ def connect *args
582
582
end
583
583
584
584
it "does not interfere with other statements" do
585
- @multi_client . query ( "select 1 as 'set_1'; select 2 as 'set_2'")
585
+ @multi_client . query ( "SELECT 1 AS 'set_1'; SELECT 2 AS 'set_2'")
586
586
while ( @multi_client . next_result )
587
587
@multi_client . store_result
588
588
end
589
589
590
- @multi_client . query ( "select 3 as 'next'") . first . should == { 'next' => 3 }
590
+ @multi_client . query ( "SELECT 3 AS 'next'") . first . should == { 'next' => 3 }
591
591
end
592
592
593
593
it "will raise on query if there are outstanding results to read" do
@@ -606,7 +606,7 @@ def connect *args
606
606
end
607
607
608
608
it "#more_results? should work" do
609
- @multi_client . query ( "select 1 as 'set_1'; select 2 as 'set_2'")
609
+ @multi_client . query ( "SELECT 1 AS 'set_1'; SELECT 2 AS 'set_2'")
610
610
@multi_client . more_results? . should be_true
611
611
612
612
@multi_client . next_result
0 commit comments