Skip to content

Isolating each Database typeΒ #133

@lovelyjoy1991

Description

@lovelyjoy1991

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions