Skip to content

oracle driver #176

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

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

oracle driver #176

wants to merge 23 commits into from

Conversation

NikodemMarek
Copy link

@NikodemMarek NikodemMarek commented Apr 28, 2025

Important

Add Oracle database support with new driver, configuration, and CLI updates.

  • Behavior:
    • Adds Oracle database support with OracleDriver in src/database/oracle/mod.rs.
    • Implements connection options in src/database/oracle/connect_options.rs.
    • Updates App in src/app.rs to handle Oracle driver.
  • Configuration:
    • Adds Oracle configuration to Cargo.toml and docker-compose.yml.
    • Updates src/config.rs to support Oracle connection strings.
  • CLI:
    • Updates src/cli.rs to include Oracle as a valid driver.
  • Testing:
    • Adds tests for Oracle connection options in src/database/oracle/connect_options.rs.
  • Misc:
    • Adds Oracle initialization script dev/oracle_init.sql.
    • Updates README.md to include Oracle in supported databases.
    • Minor formatting fixes in Dockerfile and LICENSE.

This description was created by Ellipsis for 914907b. You can customize this summary. It will automatically update as commits are pushed.

@NikodemMarek NikodemMarek marked this pull request as ready for review August 15, 2025 18:45
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 914907b in 2 minutes and 30 seconds. Click for details.
  • Reviewed 1148 lines of code in 16 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/config.rs:185
  • Draft comment:
    Avoid using unwrap in converting key sequences in KeyBindings deserialization. Instead of .unwrap() on parse_key_sequence results, handle errors gracefully (e.g. using the ? operator) so that invalid key strings don’t cause a panic.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src/config.rs:441
  • Draft comment:
    The RGB color parser assumes a fixed format (e.g., 'rgb123') and extracts digits from fixed positions. Consider a more robust parser (e.g. using regex) to handle multi-digit values and common formats like 'rgb(255,0,0)'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_GVHhKNdIBWodryoK

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

NikodemMarek and others added 3 commits August 15, 2025 21:43
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@NikodemMarek
Copy link
Author

@achristmascarl I think this branch is ready for review, please let me know if there are any more changes required that I forgot about

@achristmascarl
Copy link
Owner

@NikodemMarek sounds good, and great work! I'll run CI now (which is using latest stable, so 1.89; you might get some clippy errors if you haven't upgraded recently).

A few things:

  1. One feature I added since you've started working on this is for the drivers connecting to database servers (postgres and mysql) to actually terminate the process of a query when the query gets aborted. That way, if you cancel a long-running/expensive query, you don't have to worry about it consuming resources in the background for some indefinite amount of time.
    • You can see how it's implemented for the other drivers in this PR: terminate query processes in postgres and mysql #187
    • I think this should be possible with with Oracle's ALTER SYSTEM KILL SESSION 'sid,serial#';, but I'm not sure as I haven't used it before. It seems like there's also an option to ALTER SYSTEM CANCEL SQL 'SID, SERIAL[, @INST_ID][, SQL_ID]'; in 18c and beyond [0]
    • It seems like you'd need to be a user with ALTER SYSTEM permissions [1] for this to work [2], so the case where the user doesn't have permissions would need to be handled, either by just ignoring that request, or by otherwise killing the session/query, if there is another way.
  2. I ran cargo update at some point, and it seems like that might have gotten undone with the Cargo.lock changes. So if you could run cargo update once you're done with everything else, that would be appreciated

[0] https://oracle-base.com/articles/18c/alter-system-cancel-sql-18c
[1] https://forums.oracle.com/ords/apexds/post/kill-a-process-9350
[2] https://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/283689.htm

@NikodemMarek NikodemMarek marked this pull request as draft August 16, 2025 18:49
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