File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -45,25 +45,24 @@ fn basic_queries(c: &mut Criterion) {
4545
4646 let large_statement = {
4747 let expressions = ( 0 ..1000 )
48- . map ( |n| format ! ( "FN_{}(COL_{})" , n , n ) )
48+ . map ( |n| format ! ( "FN_{n }(COL_{n })" ) )
4949 . collect :: < Vec < _ > > ( )
5050 . join ( ", " ) ;
5151 let tables = ( 0 ..1000 )
52- . map ( |n| format ! ( "TABLE_{}" , n ) )
52+ . map ( |n| format ! ( "TABLE_{n}" ) )
5353 . collect :: < Vec < _ > > ( )
5454 . join ( " JOIN " ) ;
5555 let where_condition = ( 0 ..1000 )
56- . map ( |n| format ! ( "COL_{} = {}" , n , n ) )
56+ . map ( |n| format ! ( "COL_{n } = {n}" ) )
5757 . collect :: < Vec < _ > > ( )
5858 . join ( " OR " ) ;
5959 let order_condition = ( 0 ..1000 )
60- . map ( |n| format ! ( "COL_{} DESC" , n ) )
60+ . map ( |n| format ! ( "COL_{n } DESC" ) )
6161 . collect :: < Vec < _ > > ( )
6262 . join ( ", " ) ;
6363
6464 format ! (
65- "SELECT {} FROM {} WHERE {} ORDER BY {}" ,
66- expressions, tables, where_condition, order_condition
65+ "SELECT {expressions} FROM {tables} WHERE {where_condition} ORDER BY {order_condition}" ,
6766 )
6867 } ;
6968
You can’t perform that action at this time.
0 commit comments