whodb icon indicating copy to clipboard operation
whodb copied to clipboard

[FR] Automatically parse database URL when pasting

Open zaini opened this issue 1 year ago • 3 comments

When I paste my DB URL like postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public I'd like it to be parsed and autofill the login form:

image

Example packages that do this:

  • https://www.npmjs.com/package/ts-parse-database-url
  • https://www.npmjs.com/package/parse-db-uri

zaini avatar Oct 06 '24 02:10 zaini

Hello! Great suggestion!

We already do this for mongodb and definitely worth adding to Postgres. Adding this to our backlog. Thank you :)

hkdeman avatar Oct 06 '24 19:10 hkdeman

hey @hkdeman I would like to work on this issue

vr-varad avatar Oct 14 '24 14:10 vr-varad

Hey @vr-varad! That is great to hear. Pull up a PR and we are happy to check it out!

hkdeman avatar Oct 14 '24 17:10 hkdeman

Hi @hkdeman ,

I’ve addressed the issue and submitted a PR. As per your suggestion, I checked the mentioned two libraries for parsing fields from the URL, but I found that the existing logic was sufficient and didn’t require any additional dependencies.

Please review the changes and let me know if there’s anything else that needed. I’m happy to contribute more!

HarshDodiya1 avatar Dec 04 '24 15:12 HarshDodiya1

Thank you for the contribution! @modelorona has left a quick comment on it. Let us know your thoughts :)

hkdeman avatar Dec 09 '24 09:12 hkdeman