Merge pull request #17423 from MarcusNoble/master

Added ping method to MySQL IConnection
This commit is contained in:
Paul van Brenk
2017-06-27 14:47:09 -07:00
committed by GitHub
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -58,6 +58,8 @@ interface IConnection {
end(callback: (err: IError, ...args: any[]) => void): void;
end(options: any, callback: (err: IError, ...args: any[]) => void): void;
ping(callback: (err: IError) => void): void;
destroy(): void;
pause(): void;
+5
View File
@@ -148,6 +148,11 @@ connection.connect(function (err) {
console.log('connected as id ' + connection.threadId);
});
connection.ping(function (err) {
if (err) throw err;
console.log('Ping was successful');
})
/// Pools
var poolConfig = {