@@ -41,7 +41,14 @@ extension SnapshotTests {
4141 someColumns: SomeColumns ( isCompleted: true , isPastDue: false )
4242 )
4343 }
44- )
44+ ) {
45+ """
46+ INSERT INTO " items "
47+ ( " title " , " quantity " , " isCompleted " , " isPastDue " )
48+ VALUES
49+ ('Hello', 24, 1, 0)
50+ """
51+ }
4552 assertQuery (
4653 Item . insert {
4754 ( $0. title, $0. quantity, $0. someColumns. isCompleted, $0. someColumns. isPastDue)
@@ -104,6 +111,11 @@ extension SnapshotTests {
104111 │ ) │
105112 ├───────────────────────┤
106113 │ SomeColumns( │
114+ │ isCompleted: true, │
115+ │ isPastDue: false │
116+ │ ) │
117+ ├───────────────────────┤
118+ │ SomeColumns( │
107119 │ isCompleted: false, │
108120 │ isPastDue: false │
109121 │ ) │
@@ -136,6 +148,15 @@ extension SnapshotTests {
136148 │ ) │
137149 ├─────────────────────────────┤
138150 │ Item( │
151+ │ title: " Hello " , │
152+ │ quantity: 24, │
153+ │ someColumns: SomeColumns( │
154+ │ isCompleted: false, │
155+ │ isPastDue: true │
156+ │ ) │
157+ │ ) │
158+ ├─────────────────────────────┤
159+ │ Item( │
139160 │ title: " Blob " , │
140161 │ quantity: 42, │
141162 │ someColumns: SomeColumns( │
@@ -168,6 +189,11 @@ extension SnapshotTests {
168189 │ ) │
169190 ├───────────────────────┤
170191 │ SomeColumns( │
192+ │ isCompleted: true, │
193+ │ isPastDue: false │
194+ │ ) │
195+ ├───────────────────────┤
196+ │ SomeColumns( │
171197 │ isCompleted: false, │
172198 │ isPastDue: false │
173199 │ ) │
@@ -196,6 +222,15 @@ extension SnapshotTests {
196222 │ isPastDue: false │
197223 │ ) │
198224 │ ) │
225+ ├─────────────────────────────┤
226+ │ Item( │
227+ │ title: " Hello " , │
228+ │ quantity: 24, │
229+ │ someColumns: SomeColumns( │
230+ │ isCompleted: true, │
231+ │ isPastDue: false │
232+ │ ) │
233+ │ ) │
199234 └─────────────────────────────┘
200235 """
201236 }
@@ -255,7 +290,7 @@ private struct Item {
255290 public static var allColumns : [ any StructuredQueriesCore . TableColumnExpression ] {
256291 [ QueryValue . columns. title]
257292 + [ QueryValue . columns. quantity]
258- + SomeColumns. TableColumns . allColumns
293+ + SubtableColumns < QueryValue , SomeColumns > . allColumns( keyPath : \ . someColumns )
259294 }
260295 public var queryFragment : QueryFragment {
261296 " \( self . title) , \( self . quantity) , \( self . someColumns) "
0 commit comments