Documentation ¶
Overview ¶
Package schema provides a generic representation of database schemas. Note that our goal is not to faithfully represent all aspects of the schema, but just the relevant components for conversion to Spanner and reporting on the quality of the conversion (this motivates us to keep partial information about some features we will report on but not use in the conversion e.g. default values, check constraints).
The current version supports PostgreSQL. Expect it to grow as we support other databases. We might eventually support the Spanner schema, and potentially get rid of the ddl package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ignored ¶
Ignored represents column properties/constraints that are not represented. We drop the details, but retain presence/absence for reporting purposes.
type Key ¶
type Key struct { Column string Desc bool // By default, order is ASC. Set to true to specifiy DESC. }
Key respresents a primary key or index key.
type Table ¶
type Table struct { Name string ColNames []string // List of column names (for predictable iteration order e.g. printing). ColDefs map[string]Column // Details of columns. PrimaryKeys []Key Indexes []Index }
Table represents a database table.