File size: 1,708 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
package swodb
import (
"database/sql/driver"
"fmt"
"github.com/jackc/pgx/v5/pgtype"
)
type EnumSwitchoverState string
const (
EnumSwitchoverStateIdle EnumSwitchoverState = "idle"
EnumSwitchoverStateInProgress EnumSwitchoverState = "in_progress"
EnumSwitchoverStateUseNextDb EnumSwitchoverState = "use_next_db"
)
func (e *EnumSwitchoverState) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = EnumSwitchoverState(s)
case string:
*e = EnumSwitchoverState(s)
default:
return fmt.Errorf("unsupported scan type for EnumSwitchoverState: %T", src)
}
return nil
}
type NullEnumSwitchoverState struct {
EnumSwitchoverState EnumSwitchoverState
Valid bool // Valid is true if EnumSwitchoverState is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullEnumSwitchoverState) Scan(value interface{}) error {
if value == nil {
ns.EnumSwitchoverState, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.EnumSwitchoverState.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullEnumSwitchoverState) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.EnumSwitchoverState), nil
}
type ChangeLog struct {
ID int64
TableName string
RowID string
}
type PgStatActivity struct {
State pgtype.Text
XactStart pgtype.Timestamptz
ApplicationName pgtype.Text
}
type SwitchoverLog struct {
ID int64
Timestamp pgtype.Timestamptz
Data []byte
}
type SwitchoverState struct {
Ok bool
CurrentState EnumSwitchoverState
DbID pgtype.UUID
}
|