mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
This is also a big cleanup opportunity. We need public schema identifiers in order to support the customization of schema introspection.
38 lines
761 B
Markdown
38 lines
761 B
Markdown
# Database Schema Introspection
|
|
|
|
Get information about schema objects such as tables, columns, indexes, foreign keys, etc.
|
|
|
|
## Topics
|
|
|
|
### Querying the Schema Version
|
|
|
|
- ``Database/schemaVersion()``
|
|
|
|
### Existence Checks
|
|
|
|
- ``Database/tableExists(_:in:)``
|
|
- ``Database/triggerExists(_:in:)``
|
|
- ``Database/viewExists(_:in:)``
|
|
|
|
### Table Structure
|
|
|
|
- ``Database/columns(in:in:)``
|
|
- ``Database/foreignKeys(on:in:)``
|
|
- ``Database/indexes(on:in:)``
|
|
- ``Database/primaryKey(_:in:)``
|
|
- ``Database/table(_:hasUniqueKey:)``
|
|
|
|
### Reserved Tables
|
|
|
|
- ``Database/isGRDBInternalTable(_:)``
|
|
- ``Database/isSQLiteInternalTable(_:)``
|
|
|
|
### Supporting Types
|
|
|
|
- ``DatabaseSchemaID``
|
|
- ``DatabaseObjectID``
|
|
- ``ColumnInfo``
|
|
- ``ForeignKeyInfo``
|
|
- ``IndexInfo``
|
|
- ``PrimaryKeyInfo``
|