Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the default connection behavior #1164

Open
NikolaPeevski opened this issue Jan 21, 2025 · 0 comments
Open

Update the default connection behavior #1164

NikolaPeevski opened this issue Jan 21, 2025 · 0 comments

Comments

@NikolaPeevski
Copy link

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Currently connections to the cosmos db are achieved through createIfNotExists

Expected behavior

N/A, we need to discuss this

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Although the current behavior works, there is an underlining issue with the partition key. More specifically if the key is updated locally (in the code) and a connection is established (e.g through simply running the app and having the module registered) this will update the upstream key.
A better way of handling this is a conditional property in the module registration itself or in other means where the user opts in to use createIfNotExists instead of a simple connection. This would also allow for further flexibility of the package, for example by adding if needed support for read only databases without the write permission set.

Environment


Nest version: X.Y.Z

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

CC: @kamilmysliwiec @manekinekko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant