Skip to content

Commit f40940e

Browse files
committed
Comment corrections for jsonGroupArray()
1 parent 4ec9db3 commit f40940e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/StructuredQueriesCore/SQLite/JSONFunctions.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extension PrimaryKeyedTableDefinition where QueryValue: Codable & Sendable {
5959
/// ```swift
6060
/// @Selection struct Row {
6161
/// let remindersList: RemindersList
62-
/// @Column(as: JSONRepresentation<[Reminder]>.self)
62+
/// @Column(as: [Reminder].JSONRepresentation.self)
6363
/// let reminders: [Reminder]
6464
/// }
6565
/// RemindersList
@@ -76,15 +76,15 @@ extension PrimaryKeyedTableDefinition where QueryValue: Codable & Sendable {
7676
/// ```sql
7777
/// SELECT
7878
/// "remindersLists".…,
79-
/// iif(
80-
/// "reminders"."id" IS NULL,
81-
/// NULL,
79+
/// CASE WHEN
80+
/// ("reminders"."id" IS NOT NULL)
81+
/// THEN
8282
/// json_object(
8383
/// 'id', json_quote("id"),
8484
/// 'title', json_quote("title"),
8585
/// 'priority', json_quote("priority")
8686
/// )
87-
/// )
87+
/// END AS "reminders"
8888
/// FROM "remindersLists"
8989
/// JOIN "reminders"
9090
/// ON ("remindersLists"."id" = "reminders"."remindersListID")
@@ -125,7 +125,7 @@ extension PrimaryKeyedTableDefinition where QueryValue: _OptionalProtocol & Coda
125125
/// ```swift
126126
/// @Selection struct Row {
127127
/// let remindersList: RemindersList
128-
/// @Column(as: JSONRepresentation<[Reminder]>.self)
128+
/// @Column(as: [Reminder].JSONRepresentation.self)
129129
/// let reminders: [Reminder]
130130
/// }
131131
/// RemindersList
@@ -142,15 +142,15 @@ extension PrimaryKeyedTableDefinition where QueryValue: _OptionalProtocol & Coda
142142
/// ```sql
143143
/// SELECT
144144
/// "remindersLists".…,
145-
/// iif(
146-
/// "reminders"."id" IS NULL,
147-
/// NULL,
145+
/// CASE WHEN
146+
/// ("reminders"."id" IS NOT NULL)
147+
/// THEN
148148
/// json_object(
149149
/// 'id', json_quote("id"),
150150
/// 'title', json_quote("title"),
151151
/// 'priority', json_quote("priority")
152152
/// )
153-
/// )
153+
/// END AS "reminders"
154154
/// FROM "remindersLists"
155155
/// JOIN "reminders"
156156
/// ON ("remindersLists"."id" = "reminders"."remindersListID")

0 commit comments

Comments
 (0)