option

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APPEND                  = "append"
	DBNAME                  = "dbname"
	DEBUG                   = "debug"
	DEST_DBNAME             = "dest-dbname"
	DEST_HOST               = "dest-host"
	DEST_PORT               = "dest-port"
	DEST_TABLE              = "dest-table"
	DEST_TABLE_FILE         = "dest-table-file"
	DEST_USER               = "dest-user"
	EXCLUDE_TABLE           = "exclude-table"
	EXCLUDE_TABLE_FILE      = "exclude-table-file"
	FULL                    = "full"
	INCLUDE_TABLE           = "include-table"
	INCLUDE_TABLE_FILE      = "include-table-file"
	COPY_JOBS               = "copy-jobs"
	METADATA_JOBS           = "metadata-jobs"
	METADATA_ONLY           = "metadata-only"
	GLOBAL_METADATA_ONLY    = "global-metadata-only"
	DATA_ONLY               = "data-only"
	WITH_GLOBAL_METADATA    = "with-global-metadata"
	COMPRESSION             = "compression"
	ON_SEGMENT_THRESHOLD    = "on-segment-threshold"
	QUIET                   = "quiet"
	SOURCE_HOST             = "source-host"
	SOURCE_PORT             = "source-port"
	SOURCE_USER             = "source-user"
	TRUNCATE                = "truncate"
	VALIDATE                = "validate"
	SCHEMA                  = "schema"
	EXCLUDE_SCHEMA          = "exclude-schema" // test purpose, to reuse gpbackup integration test case
	DEST_SCHEMA             = "dest-schema"
	SCHEMA_MAPPING_FILE     = "schema-mapping-file"
	OWNER_MAPPING_FILE      = "owner-mapping-file"
	DEST_TABLESPACE         = "dest-tablespace"
	TABLESPACE_MAPPING_FILE = "tablespace-mapping-file"
	VERBOSE                 = "verbose"
	DATA_PORT_RANGE         = "data-port-range"
	CONNECTION_MODE         = "connection-mode"
)
View Source
const (
	CopyModeFull   = "full"
	CopyModeDb     = "db"
	CopyModeSchema = "schema"
	CopyModeTable  = "table"
)
View Source
const (
	ConnectionModePush = "push"
	ConnectionModePull = "pull"
)
View Source
const (
	TableModeTruncate = "truncate"
	TableModeAppend   = "append"
)

Variables

This section is empty.

Functions

func MakeIncludeOptions

func MakeIncludeOptions(initialFlags *pflag.FlagSet, testTableName string)

Types

type DbSchema

type DbSchema struct {
	Database string
	Schema   string
}

type DbTable

type DbTable struct {
	Database string
	Table
}

type Option

type Option struct {
	// contains filtered or unexported fields
}

func NewOption

func NewOption(initialFlags *pflag.FlagSet) (*Option, error)

func (Option) ContainsMetadata

func (o Option) ContainsMetadata(metadataOnly, dataOnly bool) bool

func (Option) GetConnectionMode

func (o Option) GetConnectionMode() string

func (Option) GetCopyMode

func (o Option) GetCopyMode() string

func (Option) GetDestDbnames

func (o Option) GetDestDbnames() []string

func (Option) GetDestSchemas

func (o Option) GetDestSchemas() []*DbSchema

func (Option) GetDestTables

func (o Option) GetDestTables() []*DbTable

func (Option) GetDestTablesByDb

func (o Option) GetDestTablesByDb(dbname string) []Table

func (Option) GetExclTablesByDb

func (o Option) GetExclTablesByDb(dbname string) []Table

func (Option) GetIncludePartTablesByDb

func (o Option) GetIncludePartTablesByDb(dbname string) []Table

func (Option) GetIncludeTablesByDb

func (o Option) GetIncludeTablesByDb(dbname string) []Table

func (Option) GetOwnerMap

func (o Option) GetOwnerMap() map[string]string

func (Option) GetSchemaMap

func (o Option) GetSchemaMap() map[string]string

func (Option) GetSourceDbnames

func (o Option) GetSourceDbnames() []string

func (Option) GetSourceSchemas

func (o Option) GetSourceSchemas() []*DbSchema

func (Option) GetTableMode

func (o Option) GetTableMode() string

func (Option) GetTablespaceMap

func (o Option) GetTablespaceMap() map[string]string

func (Option) GetTblDestDbnames

func (o Option) GetTblDestDbnames() []string

func (Option) GetTblSourceDbnames

func (o Option) GetTblSourceDbnames() []string

func (Option) IsBaseTableMode

func (o Option) IsBaseTableMode() bool

func (Option) MarkDestTables

func (o Option) MarkDestTables(dbname string, userTables map[string]TableStatistics, partTables map[string]bool)

func (Option) MarkExcludeTables

func (o Option) MarkExcludeTables(dbname string, userTables map[string]TableStatistics, partTables map[string]bool)

func (Option) MarkIncludeTables

func (o Option) MarkIncludeTables(dbname string, userTables map[string]TableStatistics, partTables map[string]bool)

func (Option) ValidateDestTables

func (o Option) ValidateDestTables(userTables map[string]TableStatistics, dbname string)

func (Option) ValidateExcludeTables

func (o Option) ValidateExcludeTables(userTables map[string]TableStatistics, dbname string)

func (Option) ValidateIncludeTables

func (o Option) ValidateIncludeTables(userTables map[string]TableStatistics, dbname string)

type Table

type Table struct {
	Schema       string
	Name         string
	Partition    int
	RelTuples    int64
	IsReplicated bool
}

type TablePair

type TablePair struct {
	SrcTable  Table
	DestTable Table
}

type TableStatistics

type TableStatistics struct {
	Partition    int
	RelTuples    int64
	IsReplicated bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL