toc

package
v0.0.0-...-78ca035 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBJ_AGGREGATE                 = "AGGREGATE"
	OBJ_ACCESS_METHOD             = "ACCESS METHOD"
	OBJ_CAST                      = "CAST"
	OBJ_COLLATION                 = "COLLATION"
	OBJ_COLUMN                    = "COLUMN"
	OBJ_CONSTRAINT                = "CONSTRAINT"
	OBJ_CONVERSION                = "CONVERSION"
	OBJ_DATABASE                  = "DATABASE"
	OBJ_DATABASE_GUC              = "DATABASE GUC"
	OBJ_DATABASE_METADATA         = "DATABASE METADATA"
	OBJ_DOMAIN                    = "DOMAIN"
	OBJ_EVENT_TRIGGER             = "EVENT TRIGGER"
	OBJ_EXTENSION                 = "EXTENSION"
	OBJ_FOREIGN_DATA_WRAPPER      = "FOREIGN DATA WRAPPER"
	OBJ_FOREIGN_SERVER            = "FOREIGN SERVER"
	OBJ_FOREIGN_TABLE             = "FOREIGN TABLE"
	OBJ_FUNCTION                  = "FUNCTION"
	OBJ_INDEX                     = "INDEX"
	OBJ_LANGUAGE                  = "LANGUAGE"
	OBJ_MATERIALIZED_VIEW         = "MATERIALIZED VIEW"
	OBJ_OPERATOR_CLASS            = "OPERATOR CLASS"
	OBJ_OPERATOR                  = "OPERATOR"
	OBJ_OPERATOR_FAMILY           = "OPERATOR FAMILY"
	OBJ_PROCEDURE                 = "PROCEDURE"
	OBJ_PROTOCOL                  = "PROTOCOL"
	OBJ_RELATION                  = "RELATION"
	OBJ_RESOURCE_GROUP            = "RESOURCE GROUP"
	OBJ_RESOURCE_QUEUE            = "RESOURCE QUEUE"
	OBJ_ROLE                      = "ROLE"
	OBJ_ROLE_GRANT                = "ROLE GRANT"
	OBJ_ROLE_GUC                  = "ROLE GUCS"
	OBJ_RULE                      = "RULE"
	OBJ_SCHEMA                    = "SCHEMA"
	OBJ_SEQUENCE                  = "SEQUENCE"
	OBJ_SEQUENCE_OWNER            = "SEQUENCE OWNER"
	OBJ_SERVER                    = "SERVER"
	OBJ_SESSION_GUC               = "SESSION GUCS"
	OBJ_STATISTICS                = "STATISTICS"
	OBJ_STATISTICS_EXT            = "STATISTICS_EXT"
	OBJ_TABLE                     = "TABLE"
	OBJ_TABLESPACE                = "TABLESPACE"
	OBJ_TRANSFORM                 = "TRANSFORM"
	OBJ_TRIGGER                   = "TRIGGER"
	OBJ_TEXT_SEARCH_CONFIGURATION = "TEXT SEARCH CONFIGURATION"
	OBJ_TEXT_SEARCH_DICTIONARY    = "TEXT SEARCH DICTIONARY"
	OBJ_TEXT_SEARCH_PARSER        = "TEXT SEARCH PARSER"
	OBJ_TEXT_SEARCH_TEMPLATE      = "TEXT SEARCH TEMPLATE"
	OBJ_TYPE                      = "TYPE"
	OBJ_USER_MAPPING              = "USER MAPPING"
	OBJ_VIEW                      = "VIEW"
)

These are to be used as the values for setting object type on any of the structs that require that field. Note that we do still dynamically add " METADATA" to some postdata object types to assist in batching for parallel restore.

Variables

This section is empty.

Functions

func GetIncludedPartitionRoots

func GetIncludedPartitionRoots(tocDataEntries []CoordinatorDataEntry, includeRelations []string) []string

Types

type AOEntry

type AOEntry struct {
	Modcount         int64
	LastDDLTimestamp string
}

type CoordinatorDataEntry

type CoordinatorDataEntry struct {
	Schema          string
	Name            string
	Oid             uint32
	AttributeString string
	RowsCopied      int64
	PartitionRoot   string
	IsReplicated    bool
	DistByEnum      bool
}

type IncrementalEntries

type IncrementalEntries struct {
	AO map[string]AOEntry
}

type MetadataEntry

type MetadataEntry struct {
	Schema          string
	Name            string
	ObjectType      string
	ReferenceObject string
	StartByte       uint64
	EndByte         uint64
	Tier            []uint32
}

type SegmentDataEntry

type SegmentDataEntry struct {
	StartByte uint64
	EndByte   uint64
}

type SegmentTOC

type SegmentTOC struct {
	DataEntries map[uint]SegmentDataEntry
}

func NewSegmentTOC

func NewSegmentTOC(filename string) *SegmentTOC

func (*SegmentTOC) AddSegmentDataEntry

func (toc *SegmentTOC) AddSegmentDataEntry(oid uint, startByte uint64, endByte uint64)

func (*SegmentTOC) WriteToFileAndMakeReadOnly

func (toc *SegmentTOC) WriteToFileAndMakeReadOnly(filename string) error

type StatementWithType

type StatementWithType struct {
	Schema          string
	Name            string
	ObjectType      string
	ReferenceObject string
	Statement       string
	Tier            []uint32
}

func RemoveActiveRole

func RemoveActiveRole(activeUser string, statements []StatementWithType) []StatementWithType

func SubstituteRedirectDatabaseInStatements

func SubstituteRedirectDatabaseInStatements(statements []StatementWithType, oldQuotedName string, newQuotedName string) []StatementWithType

type TOC

type TOC struct {
	GlobalEntries       []MetadataEntry
	PredataEntries      []MetadataEntry
	PostdataEntries     []MetadataEntry
	StatisticsEntries   []MetadataEntry
	DataEntries         []CoordinatorDataEntry
	IncrementalMetadata IncrementalEntries
	// contains filtered or unexported fields
}

func NewTOC

func NewTOC(filename string) *TOC

func (*TOC) AddCoordinatorDataEntry

func (toc *TOC) AddCoordinatorDataEntry(schema string, name string, oid uint32, attributeString string, rowsCopied int64, PartitionRoot string, distPolicy string, distByEnum bool)

func (*TOC) AddMetadataEntry

func (toc *TOC) AddMetadataEntry(section string, entry MetadataEntry, start, end uint64, tier []uint32)

func (*TOC) GetDataEntriesMatching

func (toc *TOC) GetDataEntriesMatching(includeSchemas []string, excludeSchemas []string,
	includeTableFQNs []string, excludeTableFQNs []string, restorePlanTableFQNs []string) []CoordinatorDataEntry

func (*TOC) GetSQLStatementForObjectTypes

func (toc *TOC) GetSQLStatementForObjectTypes(section string, metadataFile io.ReaderAt, includeObjectTypes []string, excludeObjectTypes []string, includeSchemas []string, excludeSchemas []string, includeRelations []string, excludeRelations []string) []StatementWithType

func (*TOC) InitializeMetadataEntryMap

func (toc *TOC) InitializeMetadataEntryMap()

func (*TOC) WriteToFileAndMakeReadOnly

func (toc *TOC) WriteToFileAndMakeReadOnly(filename string)

type TOCObject

type TOCObject interface {
	GetMetadataEntry() (string, MetadataEntry)
}

type TOCObjectWithMetadata

type TOCObjectWithMetadata interface {
	GetMetadataEntry() (string, MetadataEntry)
	FQN() string
}

type UniqueID

type UniqueID struct {
	ClassID uint32
	Oid     uint32
}

Jump to

Keyboard shortcuts

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