const hanaClient = require("@sap/hana-client"); const connection = hanaClient.createConnection(); const connectionParams = { host : "hxehost", port : 39013, uid : "SYSTEM", pwd : "********", databaseName : "HXE" } connection.connect(connectionParams, (err) => { if (err) { return console.error("Connection error", err); } const whereClause = process.argv[2] ? `WHERE "group" = '${process.argv[2]}'` : ""; const sql = `SELECT "name" FROM food_collection ${whereClause}`; connection.exec(sql, (err, rows) => { connection.disconnect(); if (err) { return console.error('SQL execute error:', err); } console.log("Results:", rows); console.log(`Query '${sql}' returned ${rows.length} items`); }); });