feat: Added Option for Oracle Connector to use Alias w/ Params #700
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.
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.