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

Stop using database connection strings #21

Closed
moseshll opened this issue Dec 3, 2024 · 1 comment
Closed

Stop using database connection strings #21

moseshll opened this issue Dec 3, 2024 · 1 comment

Comments

@moseshll
Copy link
Contributor

moseshll commented Dec 3, 2024

Instead the user, password, host, db name, and any other parameters should be passed in to the Connection initializer as keyword args, possibly augmented with ENV and defaults, and passed as keyword arguments to Sequel.

Using a connection string/URI as the main parameter shifts the responsibility for percent-escaping credentials onto the caller.

See https://github.com/hathitrust/rights_database/blob/main/lib/rights_database/db.rb for a representative implementation.

The connection string may be maintained for backward compatibility but should be deprecated and should loudly say so if possible.

@aelkiss
Copy link
Member

aelkiss commented Jan 31, 2025

Completed by 4d6218d / #22

@aelkiss aelkiss closed this as completed Jan 31, 2025
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

2 participants