Help us shape the future of Go! Take the 2026 Go Developer Survey

contentdata

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct{}

func NewRepository

func NewRepository() *Repository

func (*Repository) AddRoutineByMetaData

func (r *Repository) AddRoutineByMetaData(ctx context.Context, tx *connection.Tx, routine *bigqueryv2.Routine) error

func (*Repository) AddTableData

func (r *Repository) AddTableData(ctx context.Context, tx *connection.Tx, projectID, datasetID string, table *types.Table) error

func (*Repository) CountTableRows added in v0.7.0

func (r *Repository) CountTableRows(ctx context.Context, tx *connection.Tx, projectID, datasetID, tableID string) (int64, error)

CountTableRows returns the number of rows in a table, used to enforce the WRITE_EMPTY write disposition.

func (*Repository) CreateOrReplaceTable

func (r *Repository) CreateOrReplaceTable(ctx context.Context, tx *connection.Tx, projectID, datasetID string, table *types.Table) error

func (*Repository) CreateTable added in v0.1.2

func (r *Repository) CreateTable(ctx context.Context, tx *connection.Tx, table *bigqueryv2.Table) error

func (*Repository) CreateView added in v0.2.13

func (r *Repository) CreateView(ctx context.Context, tx *connection.Tx, table *bigqueryv2.Table) error

func (*Repository) DeleteTables

func (r *Repository) DeleteTables(ctx context.Context, tx *connection.Tx, projectID, datasetID string, tables []TableDeletion) error

func (*Repository) Query

func (r *Repository) Query(ctx context.Context, tx *connection.Tx, projectID, datasetID, query string, params []*bigqueryv2.QueryParameter) (*internaltypes.QueryResponse, error)

func (*Repository) TruncateTable added in v0.7.0

func (r *Repository) TruncateTable(ctx context.Context, tx *connection.Tx, projectID, datasetID, tableID string) error

TruncateTable removes every row from a table, implementing the WRITE_TRUNCATE write disposition.

func (*Repository) ViewSchema added in v0.7.0

func (r *Repository) ViewSchema(ctx context.Context, tx *connection.Tx, projectID, datasetID, viewID string) (*bigqueryv2.TableSchema, error)

ViewSchema returns the column schema of a view by analyzing its definition. The view must already exist (visible to tx). It mirrors BigQuery, which records a view's resolved schema at creation time.

type RoutineLanguageType

type RoutineLanguageType string
const (
	LanguageTypeSQL        RoutineLanguageType = "SQL"
	LanguageTypeJavaScript RoutineLanguageType = "JavaScript"
)

type RoutineType

type RoutineType string
const (
	ScalarFunctionType      RoutineType = "SCALAR_FUNCTION"
	ProcedureType           RoutineType = "PROCEDURE"
	TableValuedFunctionType RoutineType = "TABLE_VALUED_FUNCTION"
)

type TableDeletion added in v0.7.0

type TableDeletion struct {
	ID     string
	IsView bool
}

TableDeletion identifies one table or view to drop. A view must be dropped with DROP VIEW; DROP TABLE does not apply to it.

Jump to

Keyboard shortcuts

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