|
15 | 15 | <a href="https://github.com/groue/GRDB.swift/actions/workflows/CI.yml"><img alt="CI Status" src="https://github.com/groue/GRDB.swift/actions/workflows/CI.yml/badge.svg?branch=master"></a> |
16 | 16 | </p> |
17 | 17 |
|
18 | | -**Latest release**: October 12, 2024 • [version 7.0.0-beta.5](https://github.com/groue/GRDB.swift/tree/v7.0.0-beta.5) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 6 to GRDB 7](Documentation/GRDB7MigrationGuide.md) |
| 18 | +**Latest release**: October 13, 2024 • [version 7.0.0-beta.6](https://github.com/groue/GRDB.swift/tree/v7.0.0-beta.6) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 6 to GRDB 7](Documentation/GRDB7MigrationGuide.md) |
19 | 19 |
|
20 | 20 | **Requirements**: iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 7.0+ • SQLite 3.20.0+ • Swift 6+ / Xcode 16+ |
21 | 21 |
|
@@ -295,7 +295,7 @@ Documentation |
295 | 295 | #### Records and the Query Interface |
296 | 296 |
|
297 | 297 | - [Records](#records): Fetching and persistence methods for your custom structs and class hierarchies |
298 | | -- [Query Interface](#the-query-interface): A swift way to generate SQL • [create tables](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseschema) • [requests](#requests) • [associations between record types](Documentation/AssociationsBasics.md) |
| 298 | +- [Query Interface](#the-query-interface): A swift way to generate SQL • [create tables, indexes, etc](https://swiftpackageindex.com/groue/grdb.swift/v7.0.0-beta.6/documentation/grdb/databaseschema) • [requests](#requests) • [associations between record types](Documentation/AssociationsBasics.md) |
299 | 299 |
|
300 | 300 | #### Application Tools |
301 | 301 |
|
@@ -441,7 +441,7 @@ Advanced topics: |
441 | 441 |
|
442 | 442 | - [Prepared Statements] |
443 | 443 | - [Custom SQL Functions and Aggregates](#custom-sql-functions-and-aggregates) |
444 | | -- [Database Schema Introspection](#database-schema-introspection) |
| 444 | +- [Database Schema Introspection](https://swiftpackageindex.com/groue/grdb.swift/v7.0.0-beta.6/documentation/grdb/databaseschemaintrospection) |
445 | 445 | - [Row Adapters](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/rowadapter) |
446 | 446 | - [Raw SQLite Pointers](#raw-sqlite-pointers) |
447 | 447 |
|
@@ -1596,41 +1596,6 @@ try Int.fetchOne(db, request) // Int? |
1596 | 1596 | ``` |
1597 | 1597 |
|
1598 | 1598 |
|
1599 | | -## Database Schema Introspection |
1600 | | - |
1601 | | -GRDB comes with a set of schema introspection methods: |
1602 | | - |
1603 | | -```swift |
1604 | | -try dbQueue.read { db in |
1605 | | - // Bool, true if the table exists |
1606 | | - try db.tableExists("player") |
1607 | | - |
1608 | | - // [ColumnInfo], the columns in the table |
1609 | | - try db.columns(in: "player") |
1610 | | - |
1611 | | - // PrimaryKeyInfo |
1612 | | - try db.primaryKey("player") |
1613 | | - |
1614 | | - // [ForeignKeyInfo], the foreign keys defined on the table |
1615 | | - try db.foreignKeys(on: "player") |
1616 | | - |
1617 | | - // [IndexInfo], the indexes defined on the table |
1618 | | - try db.indexes(on: "player") |
1619 | | - |
1620 | | - // Bool, true if column(s) is a unique key (primary key or unique index) |
1621 | | - try db.table("player", hasUniqueKey: ["email"]) |
1622 | | -} |
1623 | | - |
1624 | | -// Bool, true if argument is the name of an internal SQLite table |
1625 | | -Database.isSQLiteInternalTable(...) |
1626 | | - |
1627 | | -// Bool, true if argument is the name of an internal GRDB table |
1628 | | -Database.isGRDBInternalTable(...) |
1629 | | -``` |
1630 | | - |
1631 | | -For more information, see [`tableExists(_:)`](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/database/tableexists(_:)) and related methods. |
1632 | | - |
1633 | | - |
1634 | 1599 | ## Raw SQLite Pointers |
1635 | 1600 |
|
1636 | 1601 | **If not all SQLite APIs are exposed in GRDB, you can still use the [SQLite C Interface](https://www.sqlite.org/c3ref/intro.html) and call [SQLite C functions](https://www.sqlite.org/c3ref/funclist.html).** |
@@ -1678,7 +1643,7 @@ try dbQueue.write { db in |
1678 | 1643 | } |
1679 | 1644 | ``` |
1680 | 1645 |
|
1681 | | -Of course, you need to open a [database connection], and [create database tables](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseschema) first. |
| 1646 | +Of course, you need to open a [database connection], and [create database tables](https://swiftpackageindex.com/groue/grdb.swift/v7.0.0-beta.6/documentation/grdb/databaseschema) first. |
1682 | 1647 |
|
1683 | 1648 | To define a record type, define a type and extend it with protocols that come with focused sets of features. |
1684 | 1649 |
|
@@ -3285,7 +3250,7 @@ So don't miss the [SQL API](#sqlite-api). |
3285 | 3250 |
|
3286 | 3251 | > **Note**: the generated SQL may change between GRDB releases, without notice: don't have your application rely on any specific SQL output. |
3287 | 3252 |
|
3288 | | -- [The Database Schema](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseschema) |
| 3253 | +- [The Database Schema](https://swiftpackageindex.com/groue/grdb.swift/v7.0.0-beta.6/documentation/grdb/databaseschema) |
3289 | 3254 | - [Requests](#requests) |
3290 | 3255 | - [Expressions](#expressions) |
3291 | 3256 | - [SQL Operators](#sql-operators) |
|
0 commit comments