common

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatQuery added in v0.10.3

func FormatQuery(query string, objects ...string) string

Wrapper around fmt.Sprintf to properly format queries for Snowflake

func ModifiedObjectByDdlOperationTypeStrings added in v0.38.0

func ModifiedObjectByDdlOperationTypeStrings() []string

ModifiedObjectByDdlOperationTypeStrings returns a slice of all String values of the enum

Types

type ModifiedObjectByDdlOperationType added in v0.38.0

type ModifiedObjectByDdlOperationType int
const (
	ModifiedObjectByDdlOperationTypeUnknown ModifiedObjectByDdlOperationType = iota
	ModifiedObjectByDdlOperationTypeAlter
	ModifiedObjectByDdlOperationTypeCreate
	ModifiedObjectByDdlOperationTypeDrop
	ModifiedObjectByDdlOperationTypeReplace
	ModifiedObjectByDdlOperationTypeUndrop
)

func ModifiedObjectByDdlOperationTypeString added in v0.38.0

func ModifiedObjectByDdlOperationTypeString(s string) (ModifiedObjectByDdlOperationType, error)

ModifiedObjectByDdlOperationTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ModifiedObjectByDdlOperationTypeValues added in v0.38.0

func ModifiedObjectByDdlOperationTypeValues() []ModifiedObjectByDdlOperationType

ModifiedObjectByDdlOperationTypeValues returns all values of the enum

func (ModifiedObjectByDdlOperationType) IsAModifiedObjectByDdlOperationType added in v0.38.0

func (i ModifiedObjectByDdlOperationType) IsAModifiedObjectByDdlOperationType() bool

IsAModifiedObjectByDdlOperationType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ModifiedObjectByDdlOperationType) MarshalJSON added in v0.38.0

func (i ModifiedObjectByDdlOperationType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ModifiedObjectByDdlOperationType

func (ModifiedObjectByDdlOperationType) String added in v0.38.0

func (*ModifiedObjectByDdlOperationType) UnmarshalJSON added in v0.38.0

func (i *ModifiedObjectByDdlOperationType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ModifiedObjectByDdlOperationType

type SnowflakeAccessedObjects added in v0.2.2

type SnowflakeAccessedObjects struct {
	Columns []SnowflakeColumn `json:"columns"`
	Domain  string            `json:"objectDomain"`
	Id      int               `json:"objectId"`
	Name    string            `json:"objectName"`
}

type SnowflakeColumn added in v0.2.2

type SnowflakeColumn struct {
	Id   int    `json:"columnId"`
	Name string `json:"columnName"`
}

type SnowflakeModifiedObjectsByDdl added in v0.38.0

type SnowflakeModifiedObjectsByDdl struct {
	ObjectDomain  string                           `json:"objectDomain"`
	ObjectId      int64                            `json:"objectId"`
	ObjectName    string                           `json:"objectName"`
	OperationType ModifiedObjectByDdlOperationType `json:"operationType"`
}

type SnowflakeObject added in v0.10.3

type SnowflakeObject struct {
	Database *string `json:"database"`
	Schema   *string `json:"schema"`
	Table    *string `json:"table"`
	Column   *string `json:"column"`
}

SnowflakeObject represents (parsed) Snowflake objects

func ParseFullName added in v0.10.3

func ParseFullName(fullName string) SnowflakeObject

Parse the fully-qualitied Snowflake resource name in a SnowflakeObject: https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html

func (SnowflakeObject) GetFullName added in v0.10.3

func (s SnowflakeObject) GetFullName(withQuotes bool) string

Retrieve the 'full name' of the Snowflake object (i.e. database.schema.table). In some cases they need to be quoted, e.g. Snowflake queries, but in other cases they never need the outer double quotes, e.g. Raito Cloud. `withQuotes` controls this.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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