-
Notifications
You must be signed in to change notification settings - Fork 17
fix: insert SHOW CREATE TABLE resp to editor #3121
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes issue #3119 by implementing functionality to insert the actual SHOW CREATE TABLE response into the query editor instead of a template. The implementation fetches the CREATE TABLE statement from the database and uses it directly.
Key changes:
- Added a new RTK Query endpoint to fetch SHOW CREATE TABLE results for tables
- Modified the schema template to use the fetched CREATE TABLE statement when available
- Updated the SchemaTree component to trigger the API call and display loading state
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/store/reducers/showCreateTable/showCreateTable.ts | New API endpoint using RTK Query to fetch SHOW CREATE TABLE results with query execution and response parsing |
| src/containers/Tenant/utils/schemaQueryTemplates.ts | Modified template to return actual CREATE TABLE statement when fetched data is available |
| src/containers/Tenant/utils/schemaActions.tsx | Added loading state handling and icon to the show create table action |
| src/containers/Tenant/utils/schema.ts | Added new mapping constant for table types to path types |
| src/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.tsx | Integrated lazy query hook to fetch and pass CREATE TABLE data with loading state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, no comments
Closes #3119
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: 🔺
Current: 66.10 MB | Main: 66.09 MB
Diff: +5.65 KB (0.01%)
ℹ️ CI Information