Skip to content

Conversation

@tianzhou
Copy link
Contributor

@tianzhou tianzhou commented Sep 23, 2025

Fix #96

@tianzhou tianzhou requested a review from Copilot September 23, 2025 09:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for individual database connection parameters as an alternative to DSN configuration, allowing users to avoid URL encoding issues with special characters in passwords.

  • Added buildDSNFromEnvParams() function to construct DSNs from individual environment variables
  • Integrated individual parameter support into the existing resolveDSN() function with proper priority handling
  • Updated documentation and configuration examples to explain both connection methods

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/config/env.ts Added new function to build DSN from individual env vars and integrated it into DSN resolution flow
src/config/tests/env.test.ts Comprehensive test suite covering all database types, edge cases, and integration scenarios
README.md Updated documentation to explain both DSN and individual parameter methods with examples
.env.example Added commented examples showing individual parameter configuration options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tianzhou tianzhou force-pushed the separate-env branch 3 times, most recently from 6b30312 to c1489ec Compare September 23, 2025 10:09
tianzhou and others added 3 commits September 23, 2025 18:10
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tianzhou tianzhou merged commit 8d5b280 into main Sep 23, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

password contains @ raise exception ''URIError: URI malformed"

2 participants