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

fix: EXPOSED-625 SchemaUtils.listTables() retrieves tables for the default schema only #2301

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

joc-a
Copy link
Collaborator

@joc-a joc-a commented Nov 11, 2024

Description

  • What: Fixed SchemaUtils.listTables() behaviour.
  • Why:
    SchemaUtils.listTables() previously retrieved tables for the default schema only, and if the user created a new schema and created tables in the new schema, these were not shown in the list.
  • How:
    This is fixed by invoking getAllTableNamesCache() instead of tableNamesByCurrentSchema in the allTablesNames() function.

Type of Change

Please mark the relevant options with an "X":

  • Bug fix
  • New feature
  • Documentation update

Updates/remove existing public API methods:

  • Is breaking change

Affected databases:

  • MariaDB
  • Mysql5
  • Mysql8
  • Oracle
  • Postgres
  • SqlServer
  • H2
  • SQLite

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs
  • Documentation for my change is up to date

Related Issues

…default schema only

`SchemaUtils.listTables()` previously retrieved tables for the default schema only, and if the user created a new schema and created tables in the new schema, these were not shown in the list. This is fixed by invoking `getAllTableNamesCache()` instead of `tableNamesByCurrentSchema` in the `allTablesNames()` function.
@joc-a joc-a requested a review from obabichevjb November 11, 2024 13:11
@joc-a joc-a marked this pull request as ready for review November 11, 2024 13:11
@joc-a joc-a merged commit 299d9c3 into main Nov 13, 2024
5 checks passed
@joc-a joc-a deleted the joc/exposed-625 branch November 13, 2024 11:30
@guredd
Copy link
Collaborator

guredd commented Jan 7, 2025

@joc-a You can not call flatMap or any other collection transformation on CachableMapWithDefault - as it will not execute lambda default {...} anymore.

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.

3 participants