Skip to content

fix(sqlite): allow Table Browser edits on implicit rowid tables #774

Description

@ZhuchkaTriplesix

Summary

PRAGMA table_info reports pk = 0 for every column when the table has no declared PRIMARY KEY. SQLite still has rowid (unless WITHOUT ROWID). Table Browser then disables editing with “no primary key detected”.

Scope

  • If primaryKeys is empty and the table is not WITHOUT ROWID, use rowid as the PK for DML.
  • Status line should not say “no primary key” in that case.
  • Tests on CREATE TABLE t (name TEXT) round-trip an UPDATE via rowid.

Out of scope

  • WITHOUT ROWID tables that truly have no PK.

Activity

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

    bugSomething isn't workingdata-gridInteractive data grid, cell editor, filtering, groupingssqliteSQLite database driver and workspace

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions