on ‎2020 Mar 16 9:00 PM
I have gone through the tutorial for the CDS CAPM:
https://developers.sap.com/tutorials/cp-apm-nodejs-create-service.html
--and--
https://developers.sap.com/tutorials/cap-service-deploy.html
Now, I am wondering if there would be any sort of way to expose different types of databases (e.g. PostgreSQL, MySQL, MariaDB, etc.) instead of just SQLite and Hana. The reason why I want to use a database other than these two is that I do not have direct access to Hana and I want something that is somewhat similar to Hana for the sake of testing. Anyways, I am currently using Postgres for my test database because I already have a Docker container with an instance of Postgres running inside of it. Anyways, this is how I have my package.json set up:
"cds": {
"requires": {
"db": {
"kind": "pg",
"model": [
"db",
"srv"
],
"credentials": {
"url": "127.0.01",
"port": "5432",
"database": "postgres",
"username": "postgres",
"password": "PGPASSWORD"
}
}
}
}
I currently have the npm package "pg" installed which is a Postgres client for Node.js. I have tried both "cds watch" and "cds deploy" Now there doesn't seem to be a deployer module for this use case unless there is a step I am missing. Any sort of direction on where to go would be extremely helpful.
Thank you everyone!
Request clarification before answering.
hi kyle,
what you're trying to do is sth we've been bothering the CAP core team with from the very beginning: support for persistence sfw other than HANA & SQLite. Due to CAP treating cf as its' birthplace, this is unfortunately the status quo.
But CAP is designed in a modular fashion, so plugging in other DB adapters is technically possible. As soon as Daniel H (CAP papa) has walked us through the internal code base at reCAP and as soon as CAP itself is Open Source, many of us are on their heels of jumping to the occasion for providing CAP persistence modules for Postgres and the like.
Keep your fingers crossed!
Best, V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.