TableRecord

A type that builds database queries with the Swift language instead of SQL.

TableRecord.swift:117
protocol TableRecord
Browse conforming types

A TableRecord type is tied to one database table, and can build SQL queries on that table.

To build SQL queries that involve several tables, define some Association between two TableRecord types.

Most of the time, your record types will get TableRecord conformance through the MutablePersistableRecord or PersistableRecord protocols, which provide persistence methods.

Configuring the Generated SQL

Counting Records

Testing for Record Existence

Throwing Record Not Found Errors

Deleting Records

Updating Records

Building Query Interface Requests

TableRecord provide convenience access to most DerivableRequest and QueryInterfaceRequest methods as static methods on the type itself.

Defining Associations