forked from pointfreeco/sqlite-data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompileTimeTests.swift
More file actions
43 lines (38 loc) · 1001 Bytes
/
CompileTimeTests.swift
File metadata and controls
43 lines (38 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import SQLiteData
#if canImport(CloudKit)
import CloudKit
#endif
private final class Model {
@FetchAll var titles: [String]
init() {
_titles = FetchAll(Reminder.select(\.title))
}
}
#if canImport(CloudKit)
@Table
struct RepresentableFields {
@Column(as: CKShare.SystemFieldsRepresentation.self)
var share: CKShare
@Column(as: CKShare?.SystemFieldsRepresentation.self)
var optionalShare: CKShare?
@Column(as: CKRecord.SystemFieldsRepresentation.self)
var record: CKRecord
@Column(as: CKRecord?.SystemFieldsRepresentation.self)
var optionalRecord: CKRecord?
}
@DatabaseFunction(
as: ((
CKShare.SystemFieldsRepresentation,
CKRecord.SystemFieldsRepresentation,
CKShare?.SystemFieldsRepresentation,
CKRecord?.SystemFieldsRepresentation
) -> Void).self
)
nonisolated func representableArguments(
share: CKShare,
record: CKRecord,
optionalShare: CKShare?,
optionalRecord: CKRecord?
) {
}
#endif