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

Isolating each Database type #133

Open
1 task
lovelyjoy1991 opened this issue Jun 7, 2024 · 0 comments
Open
1 task

Isolating each Database type #133

lovelyjoy1991 opened this issue Jun 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@lovelyjoy1991
Copy link
Contributor

lovelyjoy1991 commented Jun 7, 2024

Problem

The current application has multiple "if...else" statement which it not best practice. For example, when checking database type, using multiple if statements:

if (database === DBType.postgres) {...}
else if (database === DBType.mysql) {...}
else (database === DBType.sqlite) {...}

Solution

Use switch statements to preemptively throw operations into separate functions to completely silo cases for Postgres, Mysql, and SqLite.
This is a task for both the FRONTEND and BACKEND, and the FRONTEND is much harder.
The work for backend is actually done and it is illustrated in the picture below.
image
The road map is finish connecting the siloed pieces for postgres, then moving on to mysql.

Additional information

No response

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd love to make a PR to implement this feature!
@lovelyjoy1991 lovelyjoy1991 added the enhancement New feature or request label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant