Documentation ¶
Index ¶
- type ViewConfig
- func (v *ViewConfig) Apply(ctx context.Context, client *bigquery.Client, params map[string]string) (bool, error)
- func (v *ViewConfig) DeleteIfExist(ctx context.Context, client *bigquery.Client) (bool, error)
- func (v *ViewConfig) Diff(ctx context.Context, client *bigquery.Client, params map[string](string)) (*ViewDiff, error)
- func (v *ViewConfig) DryRun(ctx context.Context, client *bigquery.Client, params map[string]string) (bool, error)
- func (v *ViewConfig) QueryWithParam(params map[string]string) (string, error)
- type ViewDiff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ViewConfig ¶
ViewConfig is...
func CreateViewConfigsFromDatasetDir ¶
func CreateViewConfigsFromDatasetDir(dir string) ([]*ViewConfig, error)
CreateViewConfigsFromDatasetDir creates ViewConfig objects defined in the given dir directory.
func (*ViewConfig) Apply ¶
func (v *ViewConfig) Apply(ctx context.Context, client *bigquery.Client, params map[string]string) (bool, error)
Apply creates the view or updates it when it existed. Apply returns (true, nil) if the view changed and (false ,nil) if the view didn't change
func (*ViewConfig) DeleteIfExist ¶
DeleteIfExist deletes the view if it exists. DeleteIfExist returns true if the view got deleted and false if not.
func (*ViewConfig) Diff ¶
func (v *ViewConfig) Diff(ctx context.Context, client *bigquery.Client, params map[string](string)) (*ViewDiff, error)
Diff returns ViewDiff instance if the actual ViewQuery and the SQL made from Query and params are different.
func (*ViewConfig) DryRun ¶
func (v *ViewConfig) DryRun(ctx context.Context, client *bigquery.Client, params map[string]string) (bool, error)
DryRun tests Query is valid by executing the query in dry-run mode. DryRun returns true if the view might get created or updated when you call Apply and false if not.
func (*ViewConfig) QueryWithParam ¶
func (v *ViewConfig) QueryWithParam(params map[string]string) (string, error)
QueryWithParam returns the SQL made of the template Query and the given params.