Skip to content

Treat SQLite views as views #825

Closed

Description

@EVWorth

Severity: P2.

What happens

The mock's SQLite fixture has no views, so ?mock=connected → SQLite cannot show this. Against a real file with a view:

  1. Open the file from the SQLite tab.
  2. The view is listed under Tables and counted in the Tables total.
  3. The Views folder is always empty.

Cause

  • src-tauri/crates/mas-sqlite/src/schema.rs:78 returns sqlite_master.type as stored, in lower case: "table" or "view".
  • src/lib/datasource.ts:97 passes table_type through unchanged.
  • datasource.ts:106 has listViews return [].
  • src/components/schema/SchemaTree.tsx:336 and :583 filter with t.table_type !== "VIEW", which never matches "view".

Fix

In datasource.ts, map "view" to "VIEW" and "table" to "BASE TABLE", and have listViews return the view rows. Add a view to the mock SQLite fixture and a test for the mapping.

Part of #783.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 24, 2026
    8838d8e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions