Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnCount ¶
type ConnCount struct { // Name is the application name of the connection. Name string // IsNext indicates that the connection is to the new database. IsNext bool Count int }
ConnCount represents the number of connections to a database for the given application name.
type DB ¶
type DB struct { // ID is the UUID of the database, stored in the switchover_state table. ID uuid.UUID Version string }
DB contains information about a database.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table represents a table in the database.
func ScanTables ¶
ScanTables scans the database for tables returning them in insert-safe-order, meaning the first table returned will not have any foreign keys to other tables.
Tables with migrate-only data, or those used by switchover code will be omitted.
func (Table) InsertJSONRowsQuery ¶
InsesrtJSONRowsQuery returns a query that can be used to insert or upsert rows from the given JSON data.
Click to show internal directories.
Click to hide internal directories.