schema

package
v1.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schema

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

func NewSchema

func NewSchema(
	db *sqlquerywrapper.DB,
	warehouse model.Warehouse,
	conf *config.Config,
	logger logger.Logger,
) *Schema

func (*Schema) ConsolidateLocalSchemaWithStagingFiles

func (sh *Schema) ConsolidateLocalSchemaWithStagingFiles(
	ctx context.Context,
	stagingFiles []*model.StagingFile,
) (model.Schema, error)

func (*Schema) CurrentColumnsCount

func (sh *Schema) CurrentColumnsCount(t string) int

func (*Schema) FetchSchemaFromWarehouse

func (sh *Schema) FetchSchemaFromWarehouse(ctx context.Context, repo fetchSchemaRepo) (
	model.Schema,
	model.Schema,
	error,
)

FetchSchemaFromWarehouse fetches schema from warehouse

func (*Schema) GetLocalSchema

func (sh *Schema) GetLocalSchema(ctx context.Context) (model.Schema, error)

func (*Schema) GetWarehouseSchemaCopy

func (sh *Schema) GetWarehouseSchemaCopy(_ context.Context) model.Schema

func (*Schema) GetWarehouseTableSchema

func (sh *Schema) GetWarehouseTableSchema(t string) model.TableSchema

func (*Schema) IsColumnInUnrecognizedSchema

func (sh *Schema) IsColumnInUnrecognizedSchema(t, c string) bool

func (*Schema) IsWarehouseSchemaEmpty

func (sh *Schema) IsWarehouseSchemaEmpty() bool

func (*Schema) SetWarehouseTableSchema

func (sh *Schema) SetWarehouseTableSchema(t string, ts model.TableSchema)

func (*Schema) SyncRemoteSchema

func (sh *Schema) SyncRemoteSchema(ctx context.Context, repo fetchSchemaRepo, uploadID int64) (
	model.Schema,
	bool,
	error,
)

func (*Schema) TableSchemaDiff

func (sh *Schema) TableSchemaDiff(tableName string, tableSchema model.TableSchema) whutils.TableSchemaDiff

TableSchemaDiff returns the diff between the warehouse schema and the upload table schema

func (*Schema) UpdateLocalSchema

func (sh *Schema) UpdateLocalSchema(ctx context.Context, uploadId int64, updatedSchema model.Schema) error

func (*Schema) UpdateLocalSchemaWithWarehouseSchema

func (sh *Schema) UpdateLocalSchemaWithWarehouseSchema(ctx context.Context, uploadId int64) error

Jump to

Keyboard shortcuts

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