Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for views in the QuestDB web console schema explorer. The implementation introduces a new table_type field to differentiate between regular tables ('T'), materialized views ('M'), and views ('V'), providing backward compatibility with older servers that don't return this field.
Key Changes
- Added
TableTypeandViewtypes, plus new API methodsshowViewDDL()andshowViews() - Views are now categorized using the
table_typefield from the tables API instead of relying on separate state to distinguish materialized views from regular tables - Views display with a dedicated eye icon and exclude storage details (which are only relevant for physical tables)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/questdb/types.ts | Added TableType and View type definitions, added optional table_type field to Table type for backward compatibility |
| src/utils/questdb/client.ts | Added showViewDDL() and showViews() API methods |
| src/scenes/Schema/table-icon.tsx | Added ViewIcon component and rendering logic with tooltip |
| src/scenes/Schema/localStorageUtils.ts | Added VIEWS_GROUP_KEY constant for localStorage |
| src/scenes/Schema/index.tsx | Integrated views fetching, DDL export support, and categorization logic based on table_type |
| src/scenes/Schema/VirtualTables/utils.ts | Updated createTableNode() to handle views, conditionally hide storage details for views |
| src/scenes/Schema/VirtualTables/index.tsx | Added views tree section, filtering logic, and context menu support |
| src/scenes/Schema/Row/index.tsx | Updated TreeNodeKind type and rendering logic to include "view" |
Comments suppressed due to low confidence (1)
src/scenes/Schema/VirtualTables/utils.ts:167
- Views are being passed table properties (partitionBy, walEnabled, designatedTimestamp) from the Table object, but regular views typically don't have these physical storage properties since they're virtual. These properties should either be undefined/null for views or the Table type returned by the server for views should handle this. Verify that the backend API returns appropriate values for these fields when table_type is 'V'.
partitionBy: table.partitionBy,
walEnabled: table.walEnabled,
designatedTimestamp: table.designatedTimestamp,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
depends on questdb/questdb#5720 disclosure: most of the code was generated by Claude Code
emrberk
previously approved these changes
Dec 26, 2025
54 tasks
Contributor
Author
|
@emrberk many thanks for picking this up! ❤️ |
Resolved conflicts: - src/scenes/Schema/VirtualTables/index.tsx: Combined views support with AI assistant features - src/utils/questdb/client.ts: Added View import alongside validation types - e2e/questdb: Used main branch version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update createModelToolsClient to accept optional matView property - Update TableIcon usage to use 'kind' prop instead of 'isMaterializedView' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
emrberk
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
depends on questdb/questdb#5720
disclosure: most of the code was generated by Claude Code