Static Methodgrdb 7.4.0GRDB

annotated(withRequired:)

Returns a request with the columns of the associated record appended to the record selection. Records that do not have an associated record are discarded.

TableRecord+Association.swift:760
static func annotated<A>(withRequired association: A) -> QueryInterfaceRequest<Self> where Self == A.OriginRowDecoder, A : Association

The record selection is determined by databaseSelection, which defaults to all columns.

For example:

// SELECT player.*, team.color
// FROM player JOIN team ...
let teamColor = Player.team.select(Column("color"))
let request = Player.annotated(withRequired: teamColor)

See annotated(withRequired:) for more information.