You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A call to db.schema.columnDefinitions(table: "t") should return three ColumnDefinitions where the column definitions for col1 and col2 are marked as being part of the primary key.
Instead, only the first column is marked as being part of the primary key.
Given the following
CREATE TABLE
statement:A call to
db.schema.columnDefinitions(table: "t")
should return threeColumnDefinition
s where the column definitions forcol1
andcol2
are marked as being part of the primary key.Instead, only the first column is marked as being part of the primary key.
Example test case (e.g. in
SchemaReaderTests
):The test fails, as the second column is not detected as being part of the composite primary key.
This is due to the following line:
SQLite.swift/Sources/SQLite/Schema/SchemaReader.swift
Line 28 in f1bee07
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
A possible fix could be to change that line to:
Build Information
0.14.1
14.3
and macOS Ventura13.4
The text was updated successfully, but these errors were encountered: