Skip to content

Run pks_for_table in inspect, executing once at build time rather than constantly #195

@simonw

Description

@simonw

Right now several Datasette views call the await self.pks_for_table(...) method to figure out what primary keys are set for a specific table. This executes a PRAGMA table_info SQL query.

It would be faster and more efficient to execute this query for each table as part of the inspect() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions