Skip to content

Conversation

@matheuscamposmt
Copy link
Contributor

This PR introduces a modular architecture for database drivers, adds SSL/TLS support for secure connections, and integrates Amazon Redshift as a first-class driver in both backend and UI layers.

Main Changes

  • Core

    • Added postgres-native-tls and native-tls dependencies for SSL/TLS support.
    • Implemented a modular driver architecture via DatabaseDriver trait and DriverFactory.
    • Added Redshift driver with SSL support
  • UI

    • Updated connection modal with a database type selector.
    • Added driver selection dropdown (PostgreSQL, Redshift).
    • Implemented SSL toggle and dynamic port defaults based on driver type.
    • Refactored frontend logic to integrate with the new driver factory.
  • Other improvements

    • Added light/dark theme toggle.
    • Removed local database files from Git tracking (project_db/, query_db/).
    • Updated Redshift schema query for completeness.

Motivation

This refactor enables the project to support multiple SQL backends more easily and securely, paving the way for future integrations (e.g., MySQL, SQLite).

- Add postgres-native-tls for secure database connections
- Add native-tls for cross-platform SSL support
- Enable SSL connections for PostgreSQL and Redshift
- Create DatabaseDriver interface for extensibility
- Implement factory pattern for driver management
- Add DriverFactory to manage multiple database types
- Add driver configuration with default ports
- Make it easy to add new database drivers in the future
- Implement Redshift connector with SSL support
- Add schema, table, and column loading for Redshift
- Use information_schema for better permission compatibility
- Support Redshift-specific SQL queries
- Register Redshift commands in Tauri handler
- Update connection modal with database type selector
- Add driver selection dropdown (PostgreSQL, Redshift)
- Auto-adjust default ports based on selected driver
- Update connection logic to use driver factory
- Extend connection configuration to include SSL option
- Refactor frontend to dynamically use appropriate driver
- Implement theme state management
- Add CSS variables for both light and dark modes
- Create theme toggle button with Moon/Sun icons
- Sync Monaco editor theme with app theme
- Default to light theme with easy switching
- Add project_db/ and query_db/ to .gitignore
- Remove local database files from version control
- These files contain user credentials and should never be committed
- Modify schema query to use pg_catalog.pg_namespace for a complete schema list
@dancixx
Copy link
Member

dancixx commented Nov 9, 2025

@matheuscamposmt thanks for contributing, next week I will review it.

@dancixx dancixx merged commit 802f4d4 into rust-dd:main Nov 10, 2025
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.

2 participants