Skip to content

Integrate oracle client#87

Open
alegorico wants to merge 38 commits intojasondcamp:mainfrom
alegorico:main
Open

Integrate oracle client#87
alegorico wants to merge 38 commits intojasondcamp:mainfrom
alegorico:main

Conversation

@alegorico
Copy link

feat: Add comprehensive Oracle Database support with enterprise authentication

Core Oracle Implementation:
• New Oracle Database client (pyway/dbms/oracle.py) with full CRUD operations
• Oracle-specific SQL schema versioning table with NUMBER and VARCHAR2 types
• Parameterized queries using Oracle bind variables (:version syntax)
• Proper Oracle connection lifecycle management

Advanced Connection Methods:
• Easy Connect strings: host:port/service_name format
• TNS Names resolution for aliases in tnsnames.ora
• Full DSN support for complex connection descriptors
• Oracle Wallet passwordless authentication with auto-detection
• Flexible DSN building with fallback mechanisms

Oracle Client Integration:
• Oracle Thin mode (default) - no client installation required
• Oracle Thick mode with Instant Client library support
• Automatic fallback from Thick to Thin mode on errors
• Configurable Oracle Client library directory (oracle_client_lib_dir)
• TNS_ADMIN environment variable integration

Enterprise Authentication Features:
• Oracle Wallet support with multiple detection methods:

  • Explicit oracle_use_wallet configuration
  • Auto-detection via oracle_wallet_location + no username
  • TNS_ADMIN environment variable detection
    • Traditional username/password authentication
    • Robust authentication method validation and error handling

Configuration Enhancements:
• Updated CLI argument parser to include 'oracle' database type
• New Oracle-specific configuration parameters:

  • oracle_client_lib_dir: Path to Oracle Instant Client
  • oracle_wallet_location: Oracle Wallet directory path
  • oracle_use_wallet: Force wallet authentication flag
    • Enhanced main CLI validation for Oracle-specific requirements
    • Flexible validation logic for Oracle Wallet vs traditional auth

Documentation & Examples:
• Comprehensive README.md updates with Oracle configuration examples:

  • Basic Oracle with username/password
  • Oracle with TNS Names
  • Oracle Wallet authentication
  • Full DSN connection strings
    • Oracle troubleshooting section with common issues
    • Updated environment variables table with Oracle-specific options
    • Oracle Client configuration modes documentation

Testing Infrastructure:
• Oracle factory pattern integration test (tests/test_oracle.py)
• Test configuration files for different Oracle scenarios:

  • test_oracle.conf: Traditional authentication with TNS Names
  • test_oracle_wallet.conf: Oracle Wallet authentication example
    • Sample Oracle migration script (test_connector/V01_01__test_connection.sql)

Dependencies & Requirements:
• Added oracledb>=2.0.0 to requirements.txt for Oracle connectivity
• Updated supported databases list to include Oracle Database

Code Quality Improvements:
• Comprehensive error handling with informative messages
• Type hints throughout Oracle implementation
• Consistent code style with existing PyWay database adapters

This implementation provides production-ready Oracle Database support suitable for
enterprise environments with advanced security requirements and multiple deployment scenarios.

Copilot AI and others added 30 commits October 7, 2025 16:58
Co-authored-by: alegorico <5614357+alegorico@users.noreply.github.com>
Integrate complete support for Oracle databases in pyway
Added validation for required database fields based on type.
Added multiple tests for Oracle database configuration and connection.
Added a test migration script for Oracle database.
This module provides Oracle database connection configuration for testing PyWay Oracle functionality, including connection initialization and availability checks.
This file contains multiple tests for Oracle database checksums using pytest. It includes tests for valid checksums, invalid filenames, and different authentication methods.
Added tests for Oracle table import functionality with various configurations including wallet authentication and error handling for invalid schema files.
Add tests for Oracle integration using pytest.
Add tests for Oracle migration functionality using pytest.
This file contains multiple tests for validating Oracle database migrations using pytest. It includes tests for successful validation, handling of missing schemas, checksum mismatches, and Oracle Wallet authentication.
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