Static Methodgrdb 7.3.0GRDB

orderByPrimaryKey

Returns a request sorted by primary key.

TableRecord+QueryInterfaceRequest.swift:521
static func orderByPrimaryKey() -> QueryInterfaceRequest<Self>

All primary keys are supported:

struct Player: TableRecord { }
struct Country: TableRecord { }
struct Citizenship: TableRecord { }

// SELECT * FROM player ORDER BY id
let request = Player.orderByPrimaryKey()

// SELECT * FROM country ORDER BY code
let request = Country.orderByPrimaryKey()

// SELECT * FROM citizenship ORDER BY citizenId, countryCode
let request = Citizenship.orderByPrimaryKey()