feat: add SQLite fallback and multi-DB support#3
Open
ASATOV-GLITCH wants to merge 2 commits into
Open
Conversation
b4b8ebe to
409c774
Compare
afde6f7 to
8c3034b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: feat: implementation of SQLite fallback and multi-database support
Description:
Hi @Altharva2007!
I’ve been exploring your Car Dealership Manager and I really like the structure. However, I noticed that the current implementation is strictly tied to the AUS Oracle server environment. To make this project more accessible and robust, I have implemented a Multi-Database Support system with a local SQLite fallback.
Key Improvements:
Graceful Fallback Logic:
The application no longer crashes if the Oracle Instant Client or the server connection is missing. Instead, it proactively offers the user to switch to a local SQLite database (dealership.db). This makes the app functional for anyone, regardless of their location or university access.
Automated Testing Environment:
For users without an existing database, the code now automatically initializes a sample CARS table in SQLite. This allows developers to test the GUI, Insert, and Delete logic instantly upon first run.
Environment Decoupling:
By wrapping the Oracle initialization in a try-except block and making the SQL queries dynamic (checking for is_sqlite), the project is now environment-agnostic. This is a crucial step for moving from a local student script to a professional open-source tool.
Security Best Practice:
This update allows contributors to work on the frontend and core logic without needing the hardcoded Oracle credentials. It prevents the app from being "dead on arrival" for external developers.
Why this is better for the project:
Zero-Setup for new contributors: Anyone can clone the repo and hit "Run".
Offline Development: You can now work on the UI/UX even without an internet connection or VPN.
Increased Reliability: The app handles connection errors gracefully instead of exiting with a traceback.
I hope you find these changes beneficial for the project's growth! Looking forward to your feedback.