Skip to content

Commit 334a63a

Browse files
committed
Update links to database schema documentation
1 parent 7e506f6 commit 334a63a

File tree

1 file changed

+4
-39
lines changed

1 file changed

+4
-39
lines changed

README.md

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Documentation
295295
#### Records and the Query Interface
296296

297297
- [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.5/documentation/grdb/databaseschema) • [requests](#requests) • [associations between record types](Documentation/AssociationsBasics.md)
299299

300300
#### Application Tools
301301

@@ -441,7 +441,7 @@ Advanced topics:
441441

442442
- [Prepared Statements]
443443
- [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.5/documentation/grdb/databaseschemaintrospection)
445445
- [Row Adapters](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/rowadapter)
446446
- [Raw SQLite Pointers](#raw-sqlite-pointers)
447447

@@ -1596,41 +1596,6 @@ try Int.fetchOne(db, request) // Int?
15961596
```
15971597

15981598

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-
16341599
## Raw SQLite Pointers
16351600

16361601
**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
16781643
}
16791644
```
16801645

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.5/documentation/grdb/databaseschema) first.
16821647

16831648
To define a record type, define a type and extend it with protocols that come with focused sets of features.
16841649

@@ -3285,7 +3250,7 @@ So don't miss the [SQL API](#sqlite-api).
32853250

32863251
> **Note**: the generated SQL may change between GRDB releases, without notice: don't have your application rely on any specific SQL output.
32873252

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.5/documentation/grdb/databaseschema)
32893254
- [Requests](#requests)
32903255
- [Expressions](#expressions)
32913256
- [SQL Operators](#sql-operators)

0 commit comments

Comments
 (0)