indexList

Retrieves a list of all indices associated with a given table.

This pragma returns a cursor where each row describes one index on the specified table. The columns in the cursor are:

  • seq: A unique sequence number for the index.

  • name: The name of the index.

  • unique: A boolean flag that is 1 if the index is unique and 0 otherwise.

  • origin: A character indicating how the index was created ('c' for CREATE INDEX, 'u' for a UNIQUE constraint, 'p' for a PRIMARY KEY constraint).

  • partial: A boolean flag that is 1 if the index is a partial index (has a WHERE clause) and 0 otherwise.

This is useful for introspecting the database schema to see which indices exist for a table.

Return

A KQLiteCursor containing the list of indices.

Author

MOHAMMAD AZIM ANSARI

Parameters

table

The table for which to list the indices.

See also