Skip to content

Conversation

LFischerstrom
Copy link
Contributor

Check List

  • Tests have been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made
The current implementation of tableSchema doesn't pass the tests added in this PR.

To pass the tests (and improve on readability) we can use pragma_table_info(<tableName>) to list the column names and their type. This results in N+1 queries but this is not an issue with SQLite https://www.sqlite.org/np1queryprob.html

@LFischerstrom LFischerstrom requested a review from a team as a code owner October 6, 2025 10:51
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Oct 6, 2025
@LFischerstrom LFischerstrom changed the title SQLite tables schema fix(sqlite-driver) Update tablesSchema Oct 6, 2025
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

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

@LFischerstrom cool! Thank you for this improvement and fix!

"scripts": {
"lint": "eslint **/*.js"
"lint": "eslint **/*.js",
"test": "jest ./**/*.test.js"
Copy link
Member

Choose a reason for hiding this comment

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

Let's rename (or just add an alias) unit so this test could run in CI unit tests with lerna run unit - that would be useful.

@KSDaemon KSDaemon self-assigned this Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants