Instance Propertygrdb 7.4.0GRDB

primaryKeyIndex

The one-based index of the column in the primary key.

Database+Schema.swift:1186
let primaryKeyIndex: Int

For columns that are not part of the primary key, it is zero.