Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb66b894

Browse files
Fix issues withCK{Record,Share}.SystemFieldsRepresentation (#284)
* Fix issues with `CK{Record,Share}.SystemFieldsRepresentation`I'm a little surprised that this diff fixes things, but it does locallyfor me, in the latest Xcode 26, so let's test this change a bit beforemerging.* Compile time tests* wip;* wip---------Co-authored-by: Brandon Williams <mbrandonw@hey.com>
1 parent88b419e commitb66b894

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

‎Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import CryptoKit
44
import StructuredQueriesCore
55

6-
extension_CKRecordwhere Self==CKRecord{
6+
extensionCKRecord{
77
publictypealias_AllFieldsRepresentation=SQLiteData._AllFieldsRepresentation<CKRecord>
88
publictypealiasSystemFieldsRepresentation=_SystemFieldsRepresentation<CKRecord>
99
}
1010

11-
extension_CKRecordwhere Self==CKShare{
11+
extensionCKShare{
1212
publictypealias_AllFieldsRepresentation=SQLiteData._AllFieldsRepresentation<CKShare>
1313
publictypealiasSystemFieldsRepresentation=_SystemFieldsRepresentation<CKShare>
1414
}
@@ -102,10 +102,6 @@
102102
privatestructDecodingError:Error{}
103103
}
104104

105-
extensionCKRecord:_CKRecord{}
106-
107-
publicprotocol_CKRecord{}
108-
109105
extensionCKDatabase.Scope{
110106
publicstructRawValueRepresentation:QueryBindable,QueryRepresentable{
111107
publicletqueryOutput:CKDatabase.Scope
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,43 @@
11
import SQLiteData
22

3+
#if canImport(CloudKit)
4+
import CloudKit
5+
#endif
6+
37
privatefinalclassModel{
48
@FetchAllvartitles:[String]
59

610
init(){
711
_titles=FetchAll(Reminder.select(\.title))
812
}
913
}
14+
15+
#if canImport(CloudKit)
16+
@Table
17+
structRepresentableFields{
18+
@Column(as:CKShare.SystemFieldsRepresentation.self)
19+
varshare:CKShare
20+
@Column(as:CKShare?.SystemFieldsRepresentation.self)
21+
varoptionalShare:CKShare?
22+
@Column(as:CKRecord.SystemFieldsRepresentation.self)
23+
varrecord:CKRecord
24+
@Column(as:CKRecord?.SystemFieldsRepresentation.self)
25+
varoptionalRecord:CKRecord?
26+
}
27+
28+
@DatabaseFunction(
29+
as:((
30+
CKShare.SystemFieldsRepresentation,
31+
CKRecord.SystemFieldsRepresentation,
32+
CKShare?.SystemFieldsRepresentation,
33+
CKRecord?.SystemFieldsRepresentation
34+
)-> Void).self
35+
)
36+
nonisolatedfunc representableArguments(
37+
share:CKShare,
38+
record:CKRecord,
39+
optionalShare:CKShare?,
40+
optionalRecord:CKRecord?
41+
){
42+
}
43+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp