File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ const  sql  =  require ( 'mssql' ) ; 
2+ 
3+ const  query  =  ( async ( )  =>  { 
4+     const  { 
5+         server, 
6+         user, 
7+         password, 
8+         pool, 
9+         database, 
10+         options
11+     }  =  require ( '../mssql.config.js' ) ; 
12+     const  cPool  =  await  sql . connect ( { 
13+         server, 
14+         user, 
15+         password, 
16+         pool, 
17+         database, 
18+         options
19+     } ) ; 
20+     return  async ( q )  =>  { 
21+         try  { 
22+             return  await  cPool . request ( ) . query ( q ) ; 
23+         }  catch  ( e )  { 
24+             console . warn ( q ) ; 
25+             console . error ( e ) ; 
26+             throw  e ; 
27+         } 
28+     } ; 
29+ } ) ; 
Original file line number Diff line number Diff line change 1+ // require('./test.dummy'); 
Original file line number Diff line number Diff line change 1+ const  tap  =  require ( 'tap' ) ; 
2+ 
3+ tap . test ( 'Dummy' ,  ( t )  =>  { 
4+     t . same ( 
5+         1 , 
6+         1 , 
7+         'should be same' 
8+     ) ; 
9+     t . end ( ) ; 
10+ } ) ; 
11+ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments