Open stefanhipfel opened 6 years ago
Hi, That's a good idea. At the moment we do not plan to add new features to hdb. New development is going into the hana-client driver
Hi,
ah good to know, thank you!
Hi, Here is how to install it: npm config set @sap:registry https://npm.sap.com npm install @sap/hana-client
Documentation: https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/58c18548dab04a438a0f9c44be82b6cd.html
I updated the Readme with this info as well.
So makes sense to implement promises in this new lib :)
Is there any document on how to use this new client with hdi? Thanks!
At the moment hdi will continue to work with hdb. In the future it should change to the new hana-client. Best regards
Where can I find the git project for the new client? So we can link this feature request there. Thanks
There isn't a git project at the moment. For internal or external clients. BCP for internal / SAP Community for external - https://answers.sap.com/index.html
I made good experiences util.promisify
ing methods provided by hdb
, like so:
function getExecutePromise(statement) {
return util.promisify(statement.execute.bind(statement));
}
const prepareCallAsync = util.promisify(this.connection.prepare.bind(this.connection));
const statement = await prepareCallAsync(sqlString);
const executePromise = this.getExecutePromise(statement);
await executePromise(paramsObj);
Hi,
it would be great to be able to use async/await with this library. In the meantime I have promisified all functions myself. It would be great if the lib itself would always return a promise instead of a callback.
Thanks!