@@ -272,7 +272,7 @@ To enable the trait, specify it in the Package.swift file that depends on Struct
272272``` diff
273273 .package(
274274 url: "https://github.com/pointfreeco/swift-structured-queries",
275- from: "0.17 .0",
275+ from: "0.22 .0",
276276+ traits: ["StructuredQueriesTagged"]
277277 ),
278278```
@@ -385,7 +385,7 @@ struct Reminder {
385385> Important: Since SQLite has no concept of grouped columns you must remember to flatten all
386386> groupings into a single list when defining your table's schema. For example, the "CREATE TABLE"
387387> statement for the ` RemindersList ` above would look like this:
388- >
388+ >
389389> ``` sql
390390> CREATE TABLE " remindersLists" (
391391> " id" INTEGER PRIMARY KEY ,
@@ -414,15 +414,15 @@ You can construct queries that access fields inside column groups using regular
414414 }
415415}
416416
417- You can even compare the ` timestamps` field directly and its columns will be flattened into a
417+ You can even compare the ` timestamps` field directly and its columns will be flattened into a
418418tuple in SQL:
419419
420420@Row {
421421 @Column {
422422 ` ` ` swift
423423 RemindersList
424- .where {
425- $0.timestamps <= Timestamps(createdAt: date1, updatedAt: date2)
424+ .where {
425+ $0.timestamps <= Timestamps(createdAt: date1, updatedAt: date2)
426426 }
427427 ` ` `
428428 }
@@ -484,9 +484,9 @@ struct Event {
484484It is possible to use enums as a domain modeling tool for your table schema, which can help you
485485emulate "inheritance" for your tables without having the burden of using reference types.
486486
487- As an example, suppose you have a table that represents attachments that can be associated with
487+ As an example, suppose you have a table that represents attachments that can be associated with
488488other tables, and an attachment can either be a link, a note or an image. One way to model this
489- is a struct to represent the attachment that holds onto an enum for the different kinds of
489+ is a struct to represent the attachment that holds onto an enum for the different kinds of
490490attachments supported, annotated with the `@Selection` macro:
491491
492492```swift
@@ -533,10 +533,10 @@ be decided which case of the `Kind` enum is chosen:
533533 }
534534 @Column {
535535 ```sql
536- SELECT
537- "attachments"."id",
538- "attachments"."link",
539- "attachments"."note",
536+ SELECT
537+ "attachments"."id",
538+ "attachments"."link",
539+ "attachments"."note",
540540 "attachments"."image"
541541 FROM "attachments"
542542 ```
@@ -554,13 +554,13 @@ only:
554554 }
555555 @Column {
556556 ```sql
557- SELECT
558- "attachments"."id",
559- "attachments"."link",
560- "attachments"."note",
557+ SELECT
558+ "attachments"."id",
559+ "attachments"."link",
560+ "attachments"."note",
561561 "attachments"."image"
562562 FROM "attachments"
563- WHERE "attachments"."image" IS NOT NULL
563+ WHERE "attachments"."image" IS NOT NULL
564564 ```
565565 }
566566}
@@ -601,9 +601,9 @@ And further, you can update attachments in the database in the usual way:
601601 @Column {
602602 ```sql
603603 UPDATE "attachments"
604- SET
605- "link" = NULL,
606- "note" = ' Goodbye world!' ,
604+ SET
605+ "link" = NULL,
606+ "note" = ' Goodbye world!' ,
607607 "image" = NULL
608608 ```
609609 }
@@ -627,7 +627,7 @@ can be defined for that data and used in the `image` case:
627627 case note(String)
628628 case image(Attachment.Image)
629629 }
630- @Selection
630+ @Selection
631631 struct Image {
632632 var caption = ""
633633 var url: URL
@@ -638,7 +638,7 @@ can be defined for that data and used in the `image` case:
638638> Note: Due to how macros expand it is necessary to fully qualify nested types, e.g.
639639> `case image(Attachment.Image)`.
640640
641- To create a SQL table that represents this data type you again must flatten all columns into a
641+ To create a SQL table that represents this data type you again must flatten all columns into a
642642single list of nullable columns:
643643
644644```sql
@@ -694,8 +694,8 @@ it's a lot more verbose:
694694}
695695` ` `
696696
697- > Note: The ` @available(iOS 26, *)` attributes are required even if targeting iOS 26 + , and
698- > the explicit initializers are required and must accept all arguments from all parent
697+ > Note: The ` @available(iOS 26, *)` attributes are required even if targeting iOS 26 + , and
698+ > the explicit initializers are required and must accept all arguments from all parent
699699> classes and pass that to ` super.init` .
700700
701701Enums provide an alternative to this approach that embraces value types, is more concise, and
0 commit comments