Add parsing of schema indexes
All checks were successful
CI / release-test (push) Successful in 12s

This commit is contained in:
2025-08-23 16:55:02 -07:00
parent e7f9934f03
commit 8245f89305
5 changed files with 71 additions and 9 deletions

View File

@@ -32,5 +32,15 @@ type Table struct {
TypeName string
}
// Schema is a container for a bunch of Tables, indexed by table name.
type Schema map[string]Table
type Index struct {
Name string `db:"index_name"`
TableName string `db:"table_name"`
Columns []string
IsUnique bool `db:"is_unique"`
// TODO: `where ...` for partial indexes
}
type Schema struct {
Tables map[string]Table
Indexes map[string]Index
}