Documentation ¶
Overview ¶
Package dbschema package implements querying and comparing schemas for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
Tables []*TableData
}
Data is the database content formatted as strings
type Index ¶
type Index struct { Name string Table string Columns []string Unique bool Partial string // partial expression }
Index is an index for a table.
type Queryer ¶
type Queryer interface { // Query executes a query that returns rows, typically a SELECT. Query(query string, args ...interface{}) (*sql.Rows, error) }
Queryer is a representation for something that can query.
type Schema ¶
Schema is the database structure.
func (*Schema) EnsureTable ¶
EnsureTable returns the table with the specified name and creates one if needed.
type Snapshots ¶
type Snapshots struct {
List []*Snapshot
}
Snapshots defines a collection of snapshot
func (*Snapshots) FindVersion ¶
FindVersion finds a snapshot with the specified version.
type Table ¶
Table is a sql table.
func (*Table) ColumnNames ¶
ColumnNames returns column names
func (*Table) FindColumn ¶
FindColumn finds a column in the table
Click to show internal directories.
Click to hide internal directories.