Add SQLite database preview support to Peek#45846
Open
thomastv wants to merge 2 commits intomicrosoft:mainfrom
Open
Add SQLite database preview support to Peek#45846thomastv wants to merge 2 commits intomicrosoft:mainfrom
thomastv wants to merge 2 commits intomicrosoft:mainfrom
Conversation
src/modules/peek/Peek.FilePreviewer/Previewers/Interfaces/ISQLitePreviewer.cs
Fixed
Show fixed
Hide fixed
src/modules/peek/Peek.FilePreviewer/Previewers/Interfaces/ISQLitePreviewer.cs
Fixed
Show fixed
Hide fixed
src/modules/peek/Peek.FilePreviewer/Previewers/SQLitePreviewer/SQLitePreviewer.cs
Fixed
Show fixed
Hide fixed
This comment has been minimized.
This comment has been minimized.
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.
Summary of the Pull Request
This PR adds SQLite database file preview support to the Peek utility, resolving issue #45757 . Three new model classes (SQLiteTableInfo, SQLiteColumnInfo, ISQLitePreviewer) and a core SQLitePreviewer class were added to read .db, .sqlite, and .sqlite3 files read-only using Microsoft.Data.Sqlite, fetching table schema via PRAGMA table_info and up to 200 rows per table. A new SQLiteControl XAML control presents the data in a two-pane layout — a tree view listing all tables on the left and a data grid showing columns and rows on the right, with intelligent column sizing that stretches the last column when space allows and falls back to horizontal scrolling for wide tables. The previewer was wired into the existing previewerFactory and FilePreview host, and three localizable strings were added to Resources.resw.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed