Documentation ¶
Overview ¶
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Index ¶
- Variables
- type AllDatabases
- type ClusterInfo
- type ConnectedClients
- type Connections
- type Counters
- type DatabaseWaitEvents
- type Databases
- type GlobalWaitEvents
- type IndexCacheHitRatio
- type Name
- type PortAndDatadir
- type ScannerValuer
- type ServerVersion
- type Setting
- type SlaveHosts10
- type SlaveHosts96
- type Slice
- type StringSlice
- type TableAccess
- type TableCacheHitRatio
- type Tablespaces
- type Unknown
- type XODB
Constants ¶
This section is empty.
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type AllDatabases ¶
type AllDatabases struct {
Datname Name // datname
}
AllDatabases represents a row from '[custom all_databases]'.
func GetAllDatabases ¶
func GetAllDatabases(db XODB) ([]*AllDatabases, error)
GetAllDatabases runs a custom query, returning results as AllDatabases.
type ClusterInfo ¶
type ClusterInfo struct { Usename string // usename Time time.Time // time ClientAddr sql.NullString // client_addr ClientHostname sql.NullString // client_hostname Version string // version Started time.Time // started IsSlave bool // is_slave }
Cluster info
func GetClusterInfos ¶
func GetClusterInfos(db XODB) ([]*ClusterInfo, error)
GetClusterInfos runs a custom query, returning results as ClusterInfo.
type ConnectedClients ¶
type ConnectedClients struct { Usename Name // usename Client sql.NullString // client State sql.NullString // state Count sql.NullInt64 // count }
Connected clients list
func GetConnectedClients ¶
func GetConnectedClients(db XODB) ([]*ConnectedClients, error)
GetConnectedClients runs a custom query, returning results as ConnectedClients.
type Connections ¶
Connections represents a row from '[custom connections]'.
func GetConnections ¶
func GetConnections(db XODB) ([]*Connections, error)
GetConnections runs a custom query, returning results as Connections.
type Counters ¶
type Counters struct { Datname Name // datname Numbackends int // numbackends XactCommit int64 // xact_commit XactRollback int64 // xact_rollback BlksRead int64 // blks_read BlksHit int64 // blks_hit TupReturned int64 // tup_returned TupFetched int64 // tup_fetched TupInserted int64 // tup_inserted TupUpdated int64 // tup_updated TupDeleted int64 // tup_deleted Conflicts int64 // conflicts TempFiles int64 // temp_files TempBytes int64 // temp_bytes Deadlocks int64 // deadlocks }
Counters represents a row from '[custom counters]'.
func GetCounters ¶
GetCounters runs a custom query, returning results as Counters.
type DatabaseWaitEvents ¶
type DatabaseWaitEvents struct { Relname Name // relname Relkind uint8 // relkind WaitEventType sql.NullString // wait_event_type WaitEvent sql.NullString // wait_event Datname Name // datname Count sql.NullInt64 // count }
DatabaseWaitEvents represents a row from '[custom database_wait_events]'.
func GetDatabaseWaitEvents ¶
func GetDatabaseWaitEvents(db XODB) ([]*DatabaseWaitEvents, error)
GetDatabaseWaitEvents runs a custom query, returning results as DatabaseWaitEvents.
type Databases ¶
Databases
func GetDatabases ¶
GetDatabases runs a custom query, returning results as Databases.
type GlobalWaitEvents ¶
type GlobalWaitEvents struct { WaitEventType string // wait_event_type WaitEvent string // wait_event Count int64 // count }
GlobalWaitEvents represents a row from '[custom global_wait_events]'.
func GetGlobalWaitEvents ¶
func GetGlobalWaitEvents(db XODB) ([]*GlobalWaitEvents, error)
GetGlobalWaitEvents runs a custom query, returning results as GlobalWaitEvents.
type IndexCacheHitRatio ¶
type IndexCacheHitRatio struct { Name string // name Ratio sql.NullFloat64 // ratio }
Table cache hit ratio
func GetIndexCacheHitRatio ¶
func GetIndexCacheHitRatio(db XODB) (*IndexCacheHitRatio, error)
GetIndexCacheHitRatio runs a custom query, returning results as IndexCacheHitRatio.
type PortAndDatadir ¶
PortAndDatadir represents a row from '[custom port_and_datadir]'.
func GetPortAndDatadir ¶
func GetPortAndDatadir(db XODB) (*PortAndDatadir, error)
GetPortAndDatadir runs a custom query, returning results as PortAndDatadir.
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type ServerVersion ¶
type ServerVersion struct {
Version string // version
}
ServerVersion represents a row from '[custom server_version]'.
func GetServerVersion ¶
func GetServerVersion(db XODB) (*ServerVersion, error)
GetServerVersion runs a custom query, returning results as ServerVersion.
type Setting ¶
Settings
func GetSettings ¶
GetSettings runs a custom query, returning results as Setting.
type SlaveHosts10 ¶
type SlaveHosts10 struct { ApplicationName sql.NullString // application_name ClientAddr sql.NullString // client_addr State sql.NullString // state ByteLag sql.NullFloat64 // byte_lag }
SlaveHosts10 represents a row from '[custom slave_hosts10]'.
func GetSlaveHosts10s ¶
func GetSlaveHosts10s(db XODB) ([]*SlaveHosts10, error)
GetSlaveHosts10s runs a custom query, returning results as SlaveHosts10.
type SlaveHosts96 ¶
type SlaveHosts96 struct { ApplicationName sql.NullString // application_name ClientAddr sql.NullString // client_addr State sql.NullString // state ByteLag sql.NullFloat64 // byte_lag }
SlaveHosts96 represents a row from '[custom slave_hosts96]'.
func GetSlaveHosts96s ¶
func GetSlaveHosts96s(db XODB) ([]*SlaveHosts96, error)
GetSlaveHosts96s runs a custom query, returning results as SlaveHosts96.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type TableAccess ¶
type TableAccess struct { Relname string // relname Relkind string // relkind Datname sql.NullString // datname Count sql.NullInt64 // count }
Table Access
func GetTableAccesses ¶
func GetTableAccesses(db XODB) ([]*TableAccess, error)
GetTableAccesses runs a custom query, returning results as TableAccess.
type TableCacheHitRatio ¶
type TableCacheHitRatio struct { Name string // name Ratio sql.NullFloat64 // ratio }
Table cache hit ratio
func GetTableCacheHitRatio ¶
func GetTableCacheHitRatio(db XODB) (*TableCacheHitRatio, error)
GetTableCacheHitRatio runs a custom query, returning results as TableCacheHitRatio.
type Tablespaces ¶
Tablespaces
func GetTablespaces ¶
func GetTablespaces(db XODB) ([]*Tablespaces, error)
GetTablespaces runs a custom query, returning results as Tablespaces.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.
Source Files ¶
- alldatabases.xo.go
- clusterinfo.xo.go
- connectedclients.xo.go
- connections.xo.go
- counters.xo.go
- databases.xo.go
- databasewaitevents.xo.go
- globalwaitevents.xo.go
- indexcachehitratio.xo.go
- portanddatadir.xo.go
- serverversion.xo.go
- setting.xo.go
- slavehosts10.xo.go
- slavehosts96.xo.go
- tableaccess.xo.go
- tablecachehitratio.xo.go
- tablespaces.xo.go
- type_fix.go
- xo_db.xo.go