mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Cleanup
This commit is contained in:
1 parent
2a2c5a772f
commit
a2c06c1bdb
1 file changed
+10
-10
@@ -4901,16 +4901,16 @@ To acknowledge that both Player and Team records may customize their selection o
|
||||
> :point_up: **Note**: you may also use SQL table aliases:
|
||||
>
|
||||
> ```swift
|
||||
> let sql = """
|
||||
> SELECT
|
||||
> \(Player.selectionSQL(alias: "p")),
|
||||
> \(Team.selectionSQL(alias: "t")),
|
||||
> MAX(r.score) AS maxScore
|
||||
> FROM players p
|
||||
> LEFT JOIN teams t ON ...
|
||||
> LEFT JOIN rounds r ON ...
|
||||
> GROUP BY ...
|
||||
> """
|
||||
> let sql = """
|
||||
> SELECT
|
||||
> \(Player.selectionSQL(alias: "p")),
|
||||
> \(Team.selectionSQL(alias: "t")),
|
||||
> MAX(r.score) AS maxScore
|
||||
> FROM players p
|
||||
> LEFT JOIN teams t ON ...
|
||||
> LEFT JOIN rounds r ON ...
|
||||
> GROUP BY ...
|
||||
> """
|
||||
> ```
|
||||
|
||||
Now is the time to build adapters (taking in account the customized selection of both players and teams). We use the `splittingRowAdapters` global function, which builds row adapters of desired widths:
|
||||
|
||||
Reference in new issue
Block a user