Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added Option for Oracle Connector to use Alias w/ Params #700

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

pangjunrong
Copy link
Contributor

The use of aliases defined in tnsnames.ora is a common connection method found in Oracle, which also enables the specification of communication protocols like TCP/TCPS (i.e. SSL-enabled) among other configurations through a DSN connection string.

This change adds parameter handling for the connection string defined for an Oracle DB connection. Specifically, the alias boolean parameter when set to true, parses the alias defined in the host directly to the oracle::Connector::new method to initialize the connector object.

For a connection using aliases, the connection string will look as such:
oracle://<username>:<password>@<alias>?alias=true
compared to the direct connection string method specifying host & port:
oracle://<username>:<password>@<host>:<port>/<database>

This will resolve issues #202, #420 & #484 — it is a requested feature for DSN connection strings in TNS aliases to be used.

@pangjunrong
Copy link
Contributor Author

pangjunrong commented Oct 25, 2024

Hey @wangxiaoying if this change is good to go, any chance we can get a minor release onto pypi? It'll be really helpful to get the MSSQL SSL support & Oracle alias connection in for downstream users to test it out 😄

@wangxiaoying
Copy link
Contributor

wangxiaoying commented Oct 29, 2024

Thank you @pangjunrong for the PR! It looks good to me. I will try to release a minor version for the new features this week.

@wangxiaoying wangxiaoying merged commit bd57460 into sfu-db:main Oct 29, 2024
2 checks passed
@wangxiaoying
Copy link
Contributor

Hi @pangjunrong , I just released an alpha version for the new features. You can install by pip install connectorx==0.3.4a3. Please feel free to give it a try!

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