Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/FeatherDatabase/Database/DatabaseModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public protocol DatabaseModel: Codable {
}

public protocol KeyedDatabaseModel: DatabaseModel {
associatedtype KeyType: Codable
associatedtype KeyType: KeyTypeAccessor

static var keyName: ColumnNames { get }
}
5 changes: 5 additions & 0 deletions Sources/FeatherDatabase/Database/Key/Key.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
// Created by Tibor Bodecs on 05/02/2024.
//

public protocol KeyTypeAccessor<T>: Codable {
associatedtype T
}

public struct Key<T>:
KeyTypeAccessor,
Sendable,
Codable,
Equatable,
Expand Down