You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							15 lines
						
					
					
						
							471 B
						
					
					
				
			
		
		
	
	
							15 lines
						
					
					
						
							471 B
						
					
					
				| /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
 | |
| const pool = require("./connect");
 | |
| 
 | |
| interface definitionInterface{
 | |
|     (message:string):void;
 | |
| }
 | |
| export default function Insert(sql: string, argument: string[], callback: definitionInterface) {
 | |
|     pool.query(sql, argument, (err, result) => {
 | |
|         if (err) {
 | |
|             return console.error(err.message);
 | |
|         }
 | |
|         callback(result.insertId);
 | |
|         pool.releaseConnection(pool);
 | |
|     });
 | |
| } |