We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79ac5f5 commit 022df89Copy full SHA for 022df89
Sources/StructuredQueriesCore/PrimaryKeyed.swift
@@ -1,5 +1,11 @@
1
/// A type representing a database table with a primary key.
2
-public protocol PrimaryKeyedTable: Table where TableColumns: PrimaryKeyedTableDefinition {
+public protocol PrimaryKeyedTable<PrimaryKey>: Table where TableColumns: PrimaryKeyedTableDefinition<PrimaryKey> {
3
+ /// A type representing this table's primary key.
4
+ ///
5
+ /// For auto-incrementing tables, this is typically `Int`.
6
+ associatedtype PrimaryKey: QueryBindable
7
+ where PrimaryKey.QueryValue == PrimaryKey, PrimaryKey.QueryValue.QueryOutput: Sendable
8
+
9
/// A type that represents this type, but with an optional primary key.
10
///
11
/// This type can be used to stage an inserted row.
0 commit comments