Skip to content

add the ability to switch to other schemas#267

Merged
danvergara merged 9 commits intomainfrom
fix-schemas-oracle
Oct 17, 2025
Merged

add the ability to switch to other schemas#267
danvergara merged 9 commits intomainfrom
fix-schemas-oracle

Conversation

@danvergara
Copy link
Copy Markdown
Owner

@danvergara danvergara commented Jun 13, 2025

Schema usage for Oracle databases

As requested in #265, this PR adds the ability to use schemas in Oracle. As you may know, they differ a little bit from the ones in Postgres since they're tightly coupled with users, but it's possible to grant access to another users.

This PR reuses the --schema from Postgres.

Say, a user1 has granted access to user2 to their schema, and the latter wants to see the user1's tables, it only has to add the schema flag to the CLI, as done for Postgres databases.

# Oracle
$ dblab --host localhost --user user2 --db FREEPDB1 --pass password --port 1521 --driver oracle --limit 50 --schema user1
$ dblab --url 'oracle://user2:password@localhost:1521/FREEPDB1' --schema user1

In the image the user2 can see the user1's tables (TEST_TABLLE in this case).

image

Fixes #265

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

QA the change by creating two different users, granting access to the second one, so that, the second could see the first user's tables.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@danvergara danvergara marked this pull request as ready for review October 9, 2025 18:22
@danvergara danvergara merged commit be5c836 into main Oct 17, 2025
4 checks passed
@danvergara danvergara deleted the fix-schemas-oracle branch October 17, 2025 18:12
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.

[FEATURE] Oracle schemas

1 participant