clear([Function]) Method

Removes all connections currently pooled in the connection pool.

Parameters

Type Name Description
Function callback Specifies the optional callback function.

Remarks

This method can be synchronous or asynchronous. Specify a callback function to use this method asynchronously, as follows:
function(err)
{
};

Example

The following SAP HANA Cloud example removes all connections in the connection pool:

var pool = hana.createPool("ServerNode=myhost-hanacloud.ondemand.com:443;uid=myusername;pwd=mypassword");
var conn = pool.getConnection();
conn.disconnect();
pool.clear();