Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
const client = hdb.createClient({
host: connection.host,
port: connection.hanaport,
database: connection.hanadatabase,
user: connection.username,
password: connection.password,
schema: connection.hanaSchema
});
client.on('error', err => {
console.error('Network connection error', err);
return reject(err);
});
client.connect(err => {
if (err) {
console.error('Connect error', err);