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

fix: parsing database kind is more permissive #57

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Nov 2, 2023

No description provided.

@robjtede robjtede requested a review from a team November 2, 2023 04:39
@robjtede robjtede force-pushed the permissive-db-kind branch 2 times, most recently from fc8948a to 37b0cff Compare November 2, 2023 14:03
Comment on lines +19 to 23
match () {
_ if input.eq_ignore_ascii_case("mysql") => Ok(Self::Mysql),
_ if input.eq_ignore_ascii_case("postgres") => Ok(Self::Postgres),
_ => Err(Self::Err::default()),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this fits better with if, else if, else. Any particular reason for match?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's my preferred style for this sort of parsing pattern, only needs 1 line added if we add support for sqlite/mssql or whatever

@robjtede robjtede merged commit 07e68d2 into main Nov 2, 2023
7 checks passed
@robjtede robjtede deleted the permissive-db-kind branch November 2, 2023 17:46
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.

None yet

2 participants