mock

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrAlreadyExists = errors.New("already exists")
)

Functions

This section is empty.

Types

type Column

type Column struct {
	Name    string
	Type    string
	Comment string
}

type MetaStore

type MetaStore struct {
	CreatedTable *MetastoreObject
	Tables       map[string]*MetastoreObject
	// contains filtered or unexported fields
}

func NewMockStore

func NewMockStore() MetaStore

func (MetaStore) AddPartition

func (m MetaStore) AddPartition(newPartition *MetastoreObject) error

func (MetaStore) AddPartitions

func (m MetaStore) AddPartitions(newPartitions []*MetastoreObject) error

func (MetaStore) AlterPartition

func (m MetaStore) AlterPartition(dbName string, tableName string, newPartition *MetastoreObject) error

func (MetaStore) AlterPartitions

func (m MetaStore) AlterPartitions(dbName string, tableName string, newPartitions []*MetastoreObject) error

func (MetaStore) AlterTable

func (m MetaStore) AlterTable(db, tableName string, table *MetastoreObject) error

func (MetaStore) CreateTable

func (m MetaStore) CreateTable(dbName, tableName string, mockTable *MetastoreObject) error

func (MetaStore) DropPartition

func (m MetaStore) DropPartition(db string, table string, partitions []string) error

func (MetaStore) GetPartition

func (m MetaStore) GetPartition(db string, table string, vals []string) (*MetastoreObject, error)

func (MetaStore) GetPartitions

func (m MetaStore) GetPartitions(dbName string, tableName string) []*MetastoreObject

func (MetaStore) GetTable

func (m MetaStore) GetTable(dbname string, tableName string) (*MetastoreObject, error)

type MetastoreObject

type MetastoreObject struct {
	DBName      string
	TableName   string
	SdTableName string
	Location    string
	Values      []string
	Columns     []*Column
}

table and partition

Jump to

Keyboard shortcuts

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