Closed stefansaasen closed 1 year ago
The PRAGMA table_info that is used to return the column definitions, returns one row for each defined column. The pk column contains:
PRAGMA
table_info
pk
... either zero for columns that are not part of the primary key, or the 1-based index of the column within the primary key).
See https://www.sqlite.org/pragma.html#pragma_table_info
Checking whether the pk column equals 1 only detects a single primary key and ignores other columns that are part of a composite primary key.
Thanks for taking the time to submit a pull request.
Before submitting, please do the following:
make lint
swift test
The
PRAGMA
table_info
that is used to return the column definitions, returns one row for each defined column. Thepk
column contains:See https://www.sqlite.org/pragma.html#pragma_table_info
Checking whether the
pk
column equals 1 only detects a single primary key and ignores other columns that are part of a composite primary key.Thanks for taking the time to submit a pull request.
Before submitting, please do the following:
make lint
to check if there are any format errors (install swiftlint first)swift test
to see if the tests pass.