Db-use-Fill-database-connection-details by GergesBernaba1 · Pull Request #1309 · dbgate/dbgate

added 19 commits

May 15, 2025 17:50
- Implemented DB2 database connection and query execution.
- Added README.md for plugin installation and features.
- Created icon.svg for DB2 representation.
- Configured package.json with dependencies and scripts.
- Developed backend driver for DB2 with methods for connection, querying, and transaction management.
- Established frontend driver with connection fields and support for various database objects.
- Implemented SQL helper functions for table creation, dropping, and selection.
- Configured Webpack for both backend and frontend builds.
- Added Prettier configuration for code formatting.
…g, and implement schema/table/column fetching
- Added TypeScript as a development dependency in package.json.
- Created comprehensive documentation for DB2 plugin fixes, including API endpoints and testing instructions.
- Improved error handling and connection stability in the DB2 driver.
- Implemented multiple query approaches to address SQL syntax issues across different DB2 versions.
- Added test scripts for verifying API endpoint functionality and connection handling.
…nism

- Added getStructureFixed.js to provide an enhanced implementation of the getStructure method for the DB2 driver, including error handling and a fallback to a basic implementation.
- Updated sql.js to exclude system schemas from schema retrieval.
- Enhanced driver.js with improved column properties and schema handling configurations.
- Modified test-db2-driver.js to use environment variables for database connection details.
- Introduced test-network-debug.js for debugging network requests and testing API endpoints directly.
…t table counts

- Added a new module `fixSchemaListIssue.js` to address the hanging issue in the `/database-connections/schema-list` endpoint and to refresh table counts correctly.
- Enhanced the DB2 driver in `index.js` to apply the new fixes during initialization.
- Created `schemaHelper.js` for helper functions related to schema operations, including refreshing schema counts.
- Introduced `schemaRefresh.js` to provide an improved implementation for refreshing schema counts.
- Updated the frontend driver configuration to include a global timeout for operations.
- Developed comprehensive test scripts (`test-all-db2-fixes.js`, `test-schema-fixes.js`, `test-sql-endpoint-fix.js`) to validate the fixes and ensure proper functionality.
- Added a verification script (`verify-fixes.js`) to check for required files and run tests with a mock DB2 connection.
…onitoring for DB2 connections

- Added network diagnostics module to assess network reliability, including socket tests, ping tests, and traceroute.
- Developed server health monitor to track connection success/failure, calculate health scores, and provide connection recommendations.
- Created test connection script to validate connection retry logic and server health monitoring.
- Enhanced frontend connection configuration form with options for retry settings, diagnostics, and troubleshooting.
- Implemented tests for procedure and function name display fixes, ensuring correct mapping from DB2 catalog.
… new helper functions and tests
…nection issues and enhance plugin functionality
- Added logic to check for server-specific port overrides in connection configuration.
- Updated connection logic to apply the overridden port if specified.
- Created a troubleshooting document for DB2 Error 10060, detailing common issues and solutions.
- Added a test script to validate the connection logic with port overrides.
- Implemented a simple WebSocket server to replace Server-Sent Events (SSE).
- Added functionality to manage WebSocket connections and emit events to connected clients.
- Introduced a ping mechanism to keep connections alive every 30 seconds.
- Added result.json files for the datalib package with 2 test suites and 6 tests, all passing.
- Added result.json file for the filterparser package with 1 test suite and 1 test, all passing.
- Added result.json file for the tools package with 1 test suite and 2 tests, all passing.

Copilot AI review requested due to automatic review settings

December 26, 2025 20:31

@GergesBernaba1

@janproch janproch changed the base branch from master to feature/db2-2026-01

January 2, 2026 13:20

@GergesBernaba1

@GergesBernaba1