bq

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bigquery

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

func New

func New(client *bigquery.Client, datasetID string) *Bigquery

New returns new Bigquery

func (*Bigquery) Apply

func (b *Bigquery) Apply(ctx context.Context, from, to *schema.Schema) error

func (*Bigquery) Plan

func (b *Bigquery) Plan(ctx context.Context, from, to *schema.Schema) (drivers.Diffs, error)

type Schema

type Schema struct {
	Name   string   `yaml:"name"`
	Desc   string   `yaml:"description,omitempty"`
	Labels []string `yaml:"labels,omitempty"`
	Tables []*Table `yaml:"tables,omitempty"`
}

func (Schema) FindTableByName

func (s Schema) FindTableByName(name string) (*Table, error)

type Table

type Table struct {
	Name    string        `yaml:"name"`
	Desc    string        `yaml:"description,omitempty"`
	Labels  []string      `yaml:"labels,omitempty"`
	Columns yaml.MapSlice `yaml:"columns,omitempty"`
}

func (*Table) FindColumnDescByName

func (t *Table) FindColumnDescByName(name string) (string, error)

Jump to

Keyboard shortcuts

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