datasquirel/package-shared/utils/endConnection.ts
2025-01-10 20:10:28 +01:00

15 lines
304 B
TypeScript

import mysql from "mysql";
/**
* # End MYSQL Connection
*/
function endConnection(connection: mysql.Connection) {
if (connection.state !== "disconnected") {
connection.end((err) => {
console.log(err?.message);
});
}
}
module.exports = endConnection;