File tree Expand file tree Collapse file tree
src/FirebirdSql.Data.FirebirdClient.Benchmarks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,18 +54,20 @@ EXECUTE BLOCK AS
5454 }
5555
5656 [ Benchmark ]
57- public void Fetch ( )
57+ public object Fetch ( )
5858 {
5959 using var conn = new FbConnection ( ConnectionString ) ;
6060 conn . Open ( ) ;
6161
6262 using var cmd = conn . CreateCommand ( ) ;
6363 cmd . CommandText = "SELECT x FROM foobar" ;
6464
65+ object last = null ;
6566 using var reader = cmd . ExecuteReader ( ) ;
6667 while ( reader . Read ( ) )
6768 {
68- var _ = reader [ 0 ] ;
69+ last = reader [ 0 ] ;
6970 }
71+ return last ;
7072 }
7173}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public void FetchGlobalSetup()
2323 }
2424
2525 [ Benchmark ]
26- public void Fetch ( )
26+ public object Fetch ( )
2727 {
2828 using var conn = new FbConnection ( ConnectionString ) ;
2929 conn . Open ( ) ;
@@ -43,11 +43,13 @@ EXECUTE BLOCK RETURNS (result {DataType}) AS
4343 END
4444 " ;
4545
46+ object last = null ;
4647 using var reader = cmd . ExecuteReader ( ) ;
4748 while ( reader . Read ( ) )
4849 {
49- _ = reader [ 0 ] ;
50+ last = reader [ 0 ] ;
5051 }
52+ return last ;
5153 }
5254 private static string GetFillExpression ( string dataType ) =>
5355 dataType switch
You can’t perform that action at this time.
0 commit comments