internal

package
v0.0.0-...-ce38ad5 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySchema

func ApplySchema(ctx context.Context, projectID string, datasetID string, views []MaterializedView) error

func ApplySchemaFromFile

func ApplySchemaFromFile(ctx context.Context, projectID, datasetID, filepath string) error

Types

type BQField

type BQField struct {
	Path  []string
	Value any
}

type BQSchemaConverter

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

func NewBQSchemaConverter

func NewBQSchemaConverter(datasetID string, mv MaterializedView) *BQSchemaConverter

func (BQSchemaConverter) ApplyBaseTableSchema

func (c BQSchemaConverter) ApplyBaseTableSchema(td *bigquery.TableMetadata) error

func (BQSchemaConverter) MaterializedViewDDL

func (c BQSchemaConverter) MaterializedViewDDL() string

func (BQSchemaConverter) MaterializedViewSchema

func (c BQSchemaConverter) MaterializedViewSchema() (*bigquery.TableMetadata, error)

type CodeGenerator

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

func NewCodeGenerator

func NewCodeGenerator(plugin *protogen.Plugin, file *protogen.File) *CodeGenerator

func (CodeGenerator) Gen

func (g CodeGenerator) Gen() error

type InsertDTO

type InsertDTO interface {
	TableName() string
	Value() map[string]any
}

type InsertDTOImpl

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

func NewInsertDTOImpl

func NewInsertDTOImpl(tableName string, fields []BQField) *InsertDTOImpl

func (*InsertDTOImpl) AddField

func (r *InsertDTOImpl) AddField(f BQField)

func (InsertDTOImpl) TableName

func (r InsertDTOImpl) TableName() string

func (InsertDTOImpl) Value

func (r InsertDTOImpl) Value() map[string]any

type MaterializedView

type MaterializedView interface {
	proto.Message

	Name() string
	Options() MaterializedViewOptions
	InsertDTO() InsertDTO
}

type MaterializedViewOptions

type MaterializedViewOptions struct {
	BaseTable       string
	EnableRefresh   bool
	RefreshInterval time.Duration
}

Directories

Path Synopsis
protobuf

Jump to

Keyboard shortcuts

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