SAP-samples / hana-hdbext-promisfied-example

Example of how to use @sap/hdbext (standard node.js SAP HANA interface) via a promisfied wrapper.
Apache License 2.0
13 stars 8 forks source link

Can this wrapper connect to a hana db defined by a user-provided service in BTP? #15

Closed mihaileb closed 1 year ago

jung-thomas commented 1 year ago

This module (and the underlying hdbext and hdb) can take credentials from just about anywhere. You can even hard code them. Now normally you load credentials using the @sap/xsenv module. There is a help method in this module that does that - createConnectionfFromEnv. I don't believe that the @sap/xsenv is going to use a user provided service. It's expecting a bound HDI container. But if you had the right tags on your user-provided service it might work. That's more of question to @sap/xsenv module however.

But this module has another startup method called createConnection where you can pass the credentials in directly. So you can always read the user-provided service yourself and pass it directly into this method.