Skip to content

Commit

Permalink
Merge pull request #1640 from groue/dev/GRDB7-hide-record-class
Browse files Browse the repository at this point in the history
GRDB 7: Stop mentioning the Record base class in the documentation
  • Loading branch information
groue committed Sep 28, 2024
2 parents 1cd7806 + 20818ee commit c404e2d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 407 deletions.
5 changes: 1 addition & 4 deletions Documentation/AssociationsBasics.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ Before we dive in, please remember that associations can not generate all possib

**Associations are available on types that adopt the necessary supporting protocols.**

When your record type is a subclass of the [Record class], all necessary protocols are already setup and ready: you can skip this chapter.

Generally speaking, associations use the [TableRecord], [FetchableRecord], and [EncodableRecord] protocols:
Associations are based on the [TableRecord], [FetchableRecord], and [EncodableRecord] protocols:

- **[TableRecord]** is the protocol that lets you declare associations between record types:

Expand Down Expand Up @@ -3005,7 +3003,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[TableRecord]: ../README.md#tablerecord-protocol
[Recommended Practices for Designing Record Types]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices
[regular aggregating methods]: ../README.md#fetching-aggregated-values
[Record class]: ../README.md#record-class
[EncodableRecord]: ../README.md#persistablerecord-protocol
[PersistableRecord]: ../README.md#persistablerecord-protocol
[Codable Records]: ../README.md#codable-records
Expand Down
7 changes: 5 additions & 2 deletions GRDB/Documentation.docc/QueryInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ For an overview, see [Records](https://github.com/groue/GRDB.swift/blob/master/R

## Topics

### Records
### Records Protocols

- ``Record``
- ``EncodableRecord``
- ``FetchableRecord``
- ``MutablePersistableRecord``
Expand Down Expand Up @@ -48,3 +47,7 @@ For an overview, see [Records](https://github.com/groue/GRDB.swift/blob/master/R
- ``SQLSubqueryable``
- ``SQLOrderingTerm``
- ``SQLSelectable``

### Legacy Types

- ``Record``
4 changes: 4 additions & 0 deletions GRDB/Record/Record.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

/// A base class for types that can be fetched and persisted in the database.
///
/// ## Overview
///
/// - warning: `Record` is a legacy GRDB type. Since GRDB 7, it is not recommended to define record types by subclassing the `Record` class. See <doc:SwiftConcurrency> for more information.
///
/// ## Topics
///
/// ### Creating Record Instances
Expand Down
Loading

0 comments on commit c404e2d

Please sign in to comment.