materialize

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ObjectPermissions = map[string]ObjectType{
	"DATABASE": {
		Permissions: []string{"U", "C"},
	},
	"SCHEMA": {
		Permissions: []string{"U", "C"},
	},
	"TABLE": {
		Permissions: []string{"a", "r", "w", "d"},
	},
	"VIEW": {
		Permissions: []string{"r"},
	},
	"MATERIALIZED VIEW": {
		Permissions: []string{"r"},
	},
	"INDEX": {
		Permissions: []string{},
	},
	"TYPE": {
		Permissions: []string{"U"},
	},
	"SOURCE": {
		Permissions: []string{"r"},
	},
	"SINK": {
		Permissions: []string{},
	},
	"CONNECTION": {
		Permissions: []string{"U"},
	},
	"SECRET": {
		Permissions: []string{"U"},
	},
	"CLUSTER": {
		Permissions: []string{"U", "C"},
	},
	"SYSTEM": {
		Permissions: []string{"R", "B", "N"},
	},
}

https://materialize.com/docs/sql/grant-privilege/#details

View Source
var Permissions = map[string]string{
	"r": "SELECT",
	"a": "INSERT",
	"w": "UPDATE",
	"d": "DELETE",
	"C": "CREATE",
	"U": "USAGE",
	"R": "CREATEROLE",
	"B": "CREATEDB",
	"N": "CREATECLUSTER",
}

Functions

func ClusterId added in v0.0.6

func ClusterId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func ClusterReplicaId added in v0.0.6

func ClusterReplicaId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func ConnectionId added in v0.0.6

func ConnectionId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func DatabaseId added in v0.0.6

func DatabaseId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func GetAwsPrivateLinkConnectionStruct added in v0.6.5

func GetAwsPrivateLinkConnectionStruct(v interface{}) awsPrivateLinkConnection

func GetSliceValueInt added in v0.0.4

func GetSliceValueInt(v []interface{}) []int

func GetSliceValueString added in v0.0.4

func GetSliceValueString(attrName string, v []interface{}) ([]string, error)

func IndexId added in v0.0.6

func IndexId(conn *sqlx.DB, indexName string) (string, error)

func MapDefaultGrantPrivileges added in v0.3.1

func MapDefaultGrantPrivileges(privileges []DefaultPrivilegeParams) (map[string][]string, error)

Converts a list of DefaultPrivilegeParamss into a map list of DefaultPrivilegeParamss would become map[string][]string

{
	"TYPE|p|s1||":         {"USAGE", "INSERT"},
	"CLUSTER|s2|s1|u3|u8": {"USAGE"},
}

func MapGrantPrivileges added in v0.3.1

func MapGrantPrivileges(privileges []string) (map[string][]string, error)

Converts a list of MZ ACL item strings into a map {"s1=arwd/s1", "u3=wd/s1"} would become map[string][]string

{
	"s1": ["INSERT", "SELECT", "UPDATE", "DELETE"]
	"u3": ["UPDATE", "DELETE"]
}

func MaterializedViewId added in v0.0.6

func MaterializedViewId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func ObjectId added in v0.1.3

func ObjectId(conn *sqlx.DB, object MaterializeObject) (string, error)

func ParseRolePrivileges added in v0.1.0

func ParseRolePrivileges(privileges []RolePrivilegeParams) (map[string][]string, error)

func PrivilegeName added in v0.3.1

func PrivilegeName(privilegeAbbreviation string) (string, error)

Converts a privilege abbrevation to name "a" would become INSERT

func QualifiedName

func QualifiedName(fields ...string) string

func QuoteIdentifier

func QuoteIdentifier(input string) string

func QuoteString

func QuoteString(input string) string

func ReadEgressIpsDatasource added in v0.0.5

func ReadEgressIpsDatasource() string

func RoleId added in v0.0.6

func RoleId(conn *sqlx.DB, roleName string) (string, error)

func ScanPrivileges added in v0.0.8

func ScanPrivileges(conn *sqlx.DB, objectType, objectId string) ([]string, error)

func SchemaId added in v0.0.6

func SchemaId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func SecretId added in v0.0.6

func SecretId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func ShowRoleParameter added in v0.6.9

func ShowRoleParameter(conn *sqlx.DB, roleName, variableName string) (string, error)

TODO: Once possible, implement ShowRoleParameter

func ShowSystemParameter added in v0.6.4

func ShowSystemParameter(conn *sqlx.DB, paramName string) (string, error)

func SinkId added in v0.0.6

func SinkId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func SourceId added in v0.0.6

func SourceId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func TableId added in v0.0.6

func TableId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func TypeId added in v0.0.6

func TypeId(conn *sqlx.DB, obj MaterializeObject) (string, error)

func ViewId added in v0.0.6

func ViewId(conn *sqlx.DB, obj MaterializeObject) (string, error)

Types

type AuctionOptions

type AuctionOptions struct {
	TickInterval string
}

func GetAuctionOptionsStruct added in v0.0.4

func GetAuctionOptionsStruct(v interface{}) AuctionOptions

type AvroDocColumn added in v0.4.1

type AvroDocColumn struct {
	Object IdentifierSchemaStruct
	Column string
	Doc    string
	Key    bool
	Value  bool
}

type AvroDocType added in v0.4.1

type AvroDocType struct {
	Object IdentifierSchemaStruct
	Doc    string
	Key    bool
	Value  bool
}

type AvroFormatSpec

type AvroFormatSpec struct {
	SchemaRegistryConnection IdentifierSchemaStruct
	KeyStrategy              string
	ValueStrategy            string
}

type BaseQuery added in v0.0.6

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

func NewBaseQuery added in v0.0.6

func NewBaseQuery(statement string) *BaseQuery

func (*BaseQuery) CustomPredicate added in v0.0.6

func (b *BaseQuery) CustomPredicate(c []string) *BaseQuery

func (*BaseQuery) Order added in v0.1.0

func (b *BaseQuery) Order(c string) *BaseQuery

func (*BaseQuery) QueryPredicate added in v0.0.6

func (b *BaseQuery) QueryPredicate(predicate map[string]string) string

type Builder added in v0.0.6

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

type CheckOptionsStruct added in v0.1.8

type CheckOptionsStruct struct {
	Field FieldStruct
	Alias string
	Bytes bool
}

type ClusterBuilder

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

DDL

func NewClusterBuilder

func NewClusterBuilder(conn *sqlx.DB, obj MaterializeObject) *ClusterBuilder

func (*ClusterBuilder) AlterCluster added in v0.8.8

func (b *ClusterBuilder) AlterCluster(reconfig_opts ReconfigurationOptions) error

func (*ClusterBuilder) AlterClusterScheduling added in v0.8.8

func (b *ClusterBuilder) AlterClusterScheduling(s SchedulingConfig) error

func (*ClusterBuilder) AvailabilityZones added in v0.1.7

func (b *ClusterBuilder) AvailabilityZones(z []string) *ClusterBuilder

func (*ClusterBuilder) Create

func (b *ClusterBuilder) Create() error

func (*ClusterBuilder) Disk added in v0.1.8

func (b *ClusterBuilder) Disk(disk bool) *ClusterBuilder

func (*ClusterBuilder) Drop

func (b *ClusterBuilder) Drop() error

func (*ClusterBuilder) GenSchedulingConfigSql added in v0.8.8

func (b *ClusterBuilder) GenSchedulingConfigSql(s SchedulingConfig) string

func (*ClusterBuilder) GenerateClusterOptions added in v0.8.8

func (b *ClusterBuilder) GenerateClusterOptions() string

func (*ClusterBuilder) GetReconfigOpts added in v0.8.8

func (b *ClusterBuilder) GetReconfigOpts(v interface{}) ReconfigurationOptions

func (*ClusterBuilder) IntrospectionDebugging added in v0.1.7

func (b *ClusterBuilder) IntrospectionDebugging() *ClusterBuilder

func (*ClusterBuilder) IntrospectionInterval added in v0.1.7

func (b *ClusterBuilder) IntrospectionInterval(i string) *ClusterBuilder

func (*ClusterBuilder) QualifiedName added in v0.0.6

func (b *ClusterBuilder) QualifiedName() string

func (*ClusterBuilder) ReplicationFactor added in v0.1.0

func (b *ClusterBuilder) ReplicationFactor(r *int) *ClusterBuilder

func (*ClusterBuilder) Scheduling added in v0.7.0

func (b *ClusterBuilder) Scheduling(v []interface{}) *ClusterBuilder

func (*ClusterBuilder) SetAvailabilityZones added in v0.1.7

func (b *ClusterBuilder) SetAvailabilityZones(availabilityZones []string)

func (*ClusterBuilder) SetDisk added in v0.1.8

func (b *ClusterBuilder) SetDisk(disk bool)

func (*ClusterBuilder) SetIntrospectionDebugging added in v0.1.7

func (b *ClusterBuilder) SetIntrospectionDebugging(introspectionDebugging bool)

func (*ClusterBuilder) SetIntrospectionInterval added in v0.1.7

func (b *ClusterBuilder) SetIntrospectionInterval(introspectionInterval string)

func (*ClusterBuilder) SetReplicationFactor added in v0.1.7

func (b *ClusterBuilder) SetReplicationFactor(newReplicationFactor int)

func (*ClusterBuilder) SetSchedulingConfig added in v0.7.0

func (b *ClusterBuilder) SetSchedulingConfig(s interface{})

func (*ClusterBuilder) SetSize added in v0.8.8

func (b *ClusterBuilder) SetSize(newSize string)

func (*ClusterBuilder) Size added in v0.1.0

func (b *ClusterBuilder) Size(s string) *ClusterBuilder

type ClusterParams added in v0.0.6

type ClusterParams struct {
	ClusterId         sql.NullString `db:"id"`
	ClusterName       sql.NullString `db:"name"`
	Managed           sql.NullBool   `db:"managed"`
	Size              sql.NullString `db:"size"`
	ReplicationFactor sql.NullInt64  `db:"replication_factor"`
	Disk              sql.NullBool   `db:"disk"`
	AvailabilityZones pq.StringArray `db:"availability_zones"`
	Comment           sql.NullString `db:"comment"`
	OwnerName         sql.NullString `db:"owner_name"`
	Privileges        pq.StringArray `db:"privileges"`
}

DML

func ListClusters added in v0.0.6

func ListClusters(conn *sqlx.DB) ([]ClusterParams, error)

func ScanCluster added in v0.0.6

func ScanCluster(conn *sqlx.DB, identifier string, byName bool) (ClusterParams, error)

type ClusterReplicaBuilder

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

DDL

func NewClusterReplicaBuilder

func NewClusterReplicaBuilder(conn *sqlx.DB, obj MaterializeObject) *ClusterReplicaBuilder

func (*ClusterReplicaBuilder) AvailabilityZone

func (b *ClusterReplicaBuilder) AvailabilityZone(z string) *ClusterReplicaBuilder

func (*ClusterReplicaBuilder) Create

func (b *ClusterReplicaBuilder) Create() error

func (*ClusterReplicaBuilder) Disk added in v0.1.8

func (*ClusterReplicaBuilder) Drop

func (b *ClusterReplicaBuilder) Drop() error

func (*ClusterReplicaBuilder) IntrospectionDebugging

func (b *ClusterReplicaBuilder) IntrospectionDebugging() *ClusterReplicaBuilder

func (*ClusterReplicaBuilder) IntrospectionInterval

func (b *ClusterReplicaBuilder) IntrospectionInterval(i string) *ClusterReplicaBuilder

func (*ClusterReplicaBuilder) QualifiedName

func (b *ClusterReplicaBuilder) QualifiedName() string

func (*ClusterReplicaBuilder) Size

type ClusterReplicaParams added in v0.0.6

type ClusterReplicaParams struct {
	ReplicaId        sql.NullString `db:"id"`
	ReplicaName      sql.NullString `db:"replica_name"`
	ClusterName      sql.NullString `db:"cluster_name"`
	Size             sql.NullString `db:"size"`
	AvailabilityZone sql.NullString `db:"availability_zone"`
	Disk             sql.NullBool   `db:"disk"`
	Comment          sql.NullString `db:"comment"`
}

DML

func ListClusterReplicas added in v0.0.6

func ListClusterReplicas(conn *sqlx.DB) ([]ClusterReplicaParams, error)

func ScanClusterReplica added in v0.0.6

func ScanClusterReplica(conn *sqlx.DB, id string) (ClusterReplicaParams, error)

type CommentBuilder added in v0.1.13

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

func NewCommentBuilder added in v0.1.13

func NewCommentBuilder(conn *sqlx.DB, obj MaterializeObject) *CommentBuilder

func (*CommentBuilder) Column added in v0.1.13

func (b *CommentBuilder) Column(column, comment string) error

func (*CommentBuilder) Object added in v0.1.13

func (b *CommentBuilder) Object(comment string) error

type Connection

type Connection struct {
	ConnectionName string
	SchemaName     string
	DatabaseName   string
	// contains filtered or unexported fields
}

func NewConnection added in v0.0.6

func NewConnection(conn *sqlx.DB, obj MaterializeObject) *Connection

func (*Connection) Alter added in v0.6.9

func (b *Connection) Alter(setOptions map[string]interface{}, resetOptions []string, isSecret, validate bool) error

func (*Connection) AlterDrop added in v0.6.9

func (b *Connection) AlterDrop(options []string, validate bool) error

func (*Connection) Drop added in v0.0.6

func (b *Connection) Drop() error

func (*Connection) QualifiedName

func (c *Connection) QualifiedName() string

func (*Connection) Rename added in v0.0.6

func (b *Connection) Rename(newConnectionName string) error

type ConnectionAwsBuilder added in v0.6.7

type ConnectionAwsBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionAwsBuilder added in v0.6.7

func NewConnectionAwsBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionAwsBuilder

func (*ConnectionAwsBuilder) AccessKeyId added in v0.6.7

func (*ConnectionAwsBuilder) AssumeRoleArn added in v0.6.7

func (b *ConnectionAwsBuilder) AssumeRoleArn(s string) *ConnectionAwsBuilder

func (*ConnectionAwsBuilder) AssumeRoleSessionName added in v0.6.7

func (b *ConnectionAwsBuilder) AssumeRoleSessionName(s string) *ConnectionAwsBuilder

func (*ConnectionAwsBuilder) AwsRegion added in v0.6.7

func (*ConnectionAwsBuilder) Create added in v0.6.7

func (b *ConnectionAwsBuilder) Create() error

func (*ConnectionAwsBuilder) Endpoint added in v0.6.7

func (*ConnectionAwsBuilder) SecretAccessKey added in v0.6.7

func (*ConnectionAwsBuilder) SessionToken added in v0.6.7

func (*ConnectionAwsBuilder) Validate added in v0.6.7

func (b *ConnectionAwsBuilder) Validate(validate bool) *ConnectionAwsBuilder

type ConnectionAwsParams added in v0.6.7

type ConnectionAwsParams struct {
	ConnectionId            sql.NullString `db:"id"`
	ConnectionName          sql.NullString `db:"connection_name"`
	SchemaName              sql.NullString `db:"schema_name"`
	DatabaseName            sql.NullString `db:"database_name"`
	Endpoint                sql.NullString `db:"endpoint"`
	AwsRegion               sql.NullString `db:"aws_region"`
	AccessKeyId             sql.NullString `db:"access_key_id"`
	AccessKeyIdSecretId     sql.NullString `db:"access_key_id_secret_id"`
	SecretAccessKeySecretId sql.NullString `db:"secret_access_key_secret_id"`
	SessionToken            sql.NullString `db:"session_token"`
	SessionTokenSecretId    sql.NullString `db:"session_token_secret_id"`
	AssumeRoleArn           sql.NullString `db:"assume_role_arn"`
	AssumeRoleSessionName   sql.NullString `db:"assume_role_session_name"`
	Comment                 sql.NullString `db:"comment"`
	Principal               sql.NullString `db:"principal"`
	OwnerName               sql.NullString `db:"owner_name"`
}

func ScanConnectionAws added in v0.6.7

func ScanConnectionAws(conn *sqlx.DB, id string) (ConnectionAwsParams, error)

type ConnectionAwsPrivatelinkBuilder

type ConnectionAwsPrivatelinkBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionAwsPrivatelinkBuilder

func NewConnectionAwsPrivatelinkBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionAwsPrivatelinkBuilder

func (*ConnectionAwsPrivatelinkBuilder) Create

func (*ConnectionAwsPrivatelinkBuilder) PrivateLinkAvailabilityZones

func (b *ConnectionAwsPrivatelinkBuilder) PrivateLinkAvailabilityZones(privateLinkAvailabilityZones []string) *ConnectionAwsPrivatelinkBuilder

func (*ConnectionAwsPrivatelinkBuilder) PrivateLinkServiceName

func (b *ConnectionAwsPrivatelinkBuilder) PrivateLinkServiceName(privateLinkServiceName string) *ConnectionAwsPrivatelinkBuilder

func (*ConnectionAwsPrivatelinkBuilder) Validate added in v0.6.10

type ConnectionAwsPrivatelinkParams added in v0.0.6

type ConnectionAwsPrivatelinkParams struct {
	ConnectionId   sql.NullString `db:"id"`
	ConnectionName sql.NullString `db:"connection_name"`
	SchemaName     sql.NullString `db:"schema_name"`
	DatabaseName   sql.NullString `db:"database_name"`
	Comment        sql.NullString `db:"comment"`
	Principal      sql.NullString `db:"principal"`
	OwnerName      sql.NullString `db:"owner_name"`
}
func ScanConnectionAwsPrivatelink(conn *sqlx.DB, id string) (ConnectionAwsPrivatelinkParams, error)

type ConnectionConfluentSchemaRegistryBuilder

type ConnectionConfluentSchemaRegistryBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionConfluentSchemaRegistryBuilder

func NewConnectionConfluentSchemaRegistryBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionConfluentSchemaRegistryBuilder
func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryAWSPrivateLink(confluentSchemaRegistryAWSPrivateLink IdentifierSchemaStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryPassword

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryPassword(confluentSchemaRegistryPassword IdentifierSchemaStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSHTunnel

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSHTunnel(confluentSchemaRegistrySSHTunnel IdentifierSchemaStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSLCa

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSLCa(confluentSchemaRegistrySSLCa ValueSecretStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSLCert

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSLCert(confluentSchemaRegistrySSLCert ValueSecretStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSLKey

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistrySSLKey(confluentSchemaRegistrySSLKey IdentifierSchemaStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryUrl

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryUrl(confluentSchemaRegistryUrl string) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryUsername

func (b *ConnectionConfluentSchemaRegistryBuilder) ConfluentSchemaRegistryUsername(confluentSchemaRegistryUsername ValueSecretStruct) *ConnectionConfluentSchemaRegistryBuilder

func (*ConnectionConfluentSchemaRegistryBuilder) Create

func (*ConnectionConfluentSchemaRegistryBuilder) Validate added in v0.1.2

type ConnectionKafkaBuilder

type ConnectionKafkaBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionKafkaBuilder

func NewConnectionKafkaBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) AwsConnection added in v0.8.7

func (b *ConnectionKafkaBuilder) AwsConnection(awsConnection IdentifierSchemaStruct) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) BuildAwsPrivateLinkString added in v0.6.10

func (b *ConnectionKafkaBuilder) BuildAwsPrivateLinkString() string

Top level AWS PrivateLink Connection

func (*ConnectionKafkaBuilder) BuildBrokersString added in v0.6.10

func (b *ConnectionKafkaBuilder) BuildBrokersString() string

BuildBrokersString returns a string of Kafka brokers DDL

func (*ConnectionKafkaBuilder) Create

func (b *ConnectionKafkaBuilder) Create() error
func (b *ConnectionKafkaBuilder) KafkaAwsPrivateLink(privatelink awsPrivateLinkConnection) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaBrokers

func (b *ConnectionKafkaBuilder) KafkaBrokers(kafkaBrokers []KafkaBroker) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaProgressTopic

func (b *ConnectionKafkaBuilder) KafkaProgressTopic(kafkaProgressTopic string) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaProgressTopicReplicationFactor added in v0.8.4

func (b *ConnectionKafkaBuilder) KafkaProgressTopicReplicationFactor(factor int) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaSASLMechanisms

func (b *ConnectionKafkaBuilder) KafkaSASLMechanisms(kafkaSASLMechanisms string) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaSASLPassword

func (b *ConnectionKafkaBuilder) KafkaSASLPassword(kafkaSASLPassword IdentifierSchemaStruct) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaSASLUsername

func (b *ConnectionKafkaBuilder) KafkaSASLUsername(kafkaSASLUsername ValueSecretStruct) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaSSHTunnel

func (b *ConnectionKafkaBuilder) KafkaSSHTunnel(kafkaSSHTunnel IdentifierSchemaStruct) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaSSLCa

func (*ConnectionKafkaBuilder) KafkaSSLCert

func (b *ConnectionKafkaBuilder) KafkaSSLCert(kafkaSSLCert ValueSecretStruct) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) KafkaSSLKey

func (*ConnectionKafkaBuilder) KafkaSecurityProtocol added in v0.3.1

func (b *ConnectionKafkaBuilder) KafkaSecurityProtocol(kafkaSecurityProtocol string) *ConnectionKafkaBuilder

func (*ConnectionKafkaBuilder) Validate added in v0.1.2

func (b *ConnectionKafkaBuilder) Validate(validate bool) *ConnectionKafkaBuilder

type ConnectionMySQLBuilder added in v0.6.7

type ConnectionMySQLBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionMySQLBuilder added in v0.6.7

func NewConnectionMySQLBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) ConnectionType added in v0.6.7

func (b *ConnectionMySQLBuilder) ConnectionType(connectionType string) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) Create added in v0.6.7

func (b *ConnectionMySQLBuilder) Create() error
func (b *ConnectionMySQLBuilder) MySQLAWSPrivateLink(mysqlAWSPrivateLink IdentifierSchemaStruct) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLHost added in v0.6.7

func (b *ConnectionMySQLBuilder) MySQLHost(mysqlHost string) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLPassword added in v0.6.7

func (b *ConnectionMySQLBuilder) MySQLPassword(mysqlPassword IdentifierSchemaStruct) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLPort added in v0.6.7

func (b *ConnectionMySQLBuilder) MySQLPort(mysqlPort int) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLSSHTunnel added in v0.6.7

func (b *ConnectionMySQLBuilder) MySQLSSHTunnel(mysqlSSHTunnel IdentifierSchemaStruct) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLSSLCa added in v0.6.7

func (*ConnectionMySQLBuilder) MySQLSSLCert added in v0.6.7

func (b *ConnectionMySQLBuilder) MySQLSSLCert(mysqlSSLCert ValueSecretStruct) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLSSLKey added in v0.6.7

func (*ConnectionMySQLBuilder) MySQLSSLMode added in v0.6.7

func (b *ConnectionMySQLBuilder) MySQLSSLMode(mysqlSSLMode string) *ConnectionMySQLBuilder

func (*ConnectionMySQLBuilder) MySQLUser added in v0.6.7

func (*ConnectionMySQLBuilder) Validate added in v0.6.7

func (b *ConnectionMySQLBuilder) Validate(validate bool) *ConnectionMySQLBuilder

type ConnectionParams added in v0.0.6

type ConnectionParams struct {
	ConnectionId   sql.NullString `db:"id"`
	ConnectionName sql.NullString `db:"connection_name"`
	SchemaName     sql.NullString `db:"schema_name"`
	DatabaseName   sql.NullString `db:"database_name"`
	ConnectionType sql.NullString `db:"connection_type"`
	Comment        sql.NullString `db:"comment"`
	OwnerName      sql.NullString `db:"owner_name"`
	Privileges     pq.StringArray `db:"privileges"`
}

func ListConnections added in v0.0.6

func ListConnections(conn *sqlx.DB, schemaName, databaseName string) ([]ConnectionParams, error)

func ScanConnection added in v0.0.6

func ScanConnection(conn *sqlx.DB, id string) (ConnectionParams, error)

type ConnectionPostgresBuilder

type ConnectionPostgresBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionPostgresBuilder

func NewConnectionPostgresBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) ConnectionType

func (b *ConnectionPostgresBuilder) ConnectionType(connectionType string) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) Create

func (b *ConnectionPostgresBuilder) Create() error
func (b *ConnectionPostgresBuilder) PostgresAWSPrivateLink(postgresAWSPrivateLink IdentifierSchemaStruct) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresDatabase

func (b *ConnectionPostgresBuilder) PostgresDatabase(postgresDatabase string) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresHost

func (b *ConnectionPostgresBuilder) PostgresHost(postgresHost string) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresPassword

func (b *ConnectionPostgresBuilder) PostgresPassword(postgresPassword IdentifierSchemaStruct) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresPort

func (b *ConnectionPostgresBuilder) PostgresPort(postgresPort int) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresSSHTunnel

func (b *ConnectionPostgresBuilder) PostgresSSHTunnel(postgresSSHTunnel IdentifierSchemaStruct) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresSSLCa

func (*ConnectionPostgresBuilder) PostgresSSLCert

func (b *ConnectionPostgresBuilder) PostgresSSLCert(postgresSSLCert ValueSecretStruct) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresSSLKey

func (*ConnectionPostgresBuilder) PostgresSSLMode

func (b *ConnectionPostgresBuilder) PostgresSSLMode(postgresSSLMode string) *ConnectionPostgresBuilder

func (*ConnectionPostgresBuilder) PostgresUser

func (*ConnectionPostgresBuilder) Validate added in v0.1.2

type ConnectionSshTunnelBuilder

type ConnectionSshTunnelBuilder struct {
	Connection
	// contains filtered or unexported fields
}

func NewConnectionSshTunnelBuilder

func NewConnectionSshTunnelBuilder(conn *sqlx.DB, obj MaterializeObject) *ConnectionSshTunnelBuilder

func (*ConnectionSshTunnelBuilder) Create

func (b *ConnectionSshTunnelBuilder) Create() error

func (*ConnectionSshTunnelBuilder) SSHHost

func (*ConnectionSshTunnelBuilder) SSHPort

func (*ConnectionSshTunnelBuilder) SSHUser

type ConnectionSshTunnelParams added in v0.0.6

type ConnectionSshTunnelParams struct {
	ConnectionId   sql.NullString `db:"id"`
	ConnectionName sql.NullString `db:"connection_name"`
	SchemaName     sql.NullString `db:"schema_name"`
	DatabaseName   sql.NullString `db:"database_name"`
	PublicKey1     sql.NullString `db:"public_key_1"`
	PublicKey2     sql.NullString `db:"public_key_2"`
	Comment        sql.NullString `db:"comment"`
	OwnerName      sql.NullString `db:"owner_name"`
}

func ScanConnectionSshTunnel added in v0.0.6

func ScanConnectionSshTunnel(conn *sqlx.DB, id string) (ConnectionSshTunnelParams, error)

type CounterOptions

type CounterOptions struct {
	TickInterval   string
	MaxCardinality int
}

func GetCounterOptionsStruct added in v0.0.4

func GetCounterOptionsStruct(v interface{}) CounterOptions

type CsvFormatSpec

type CsvFormatSpec struct {
	Columns     int
	DelimitedBy string
	Header      []string
}

type DatabaseBuilder

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

func NewDatabaseBuilder

func NewDatabaseBuilder(conn *sqlx.DB, obj MaterializeObject) *DatabaseBuilder

func (*DatabaseBuilder) Create

func (b *DatabaseBuilder) Create() error

func (*DatabaseBuilder) Drop

func (b *DatabaseBuilder) Drop() error

func (*DatabaseBuilder) DropPublicSchema added in v0.7.0

func (b *DatabaseBuilder) DropPublicSchema() error

func (*DatabaseBuilder) QualifiedName

func (b *DatabaseBuilder) QualifiedName() string

type DatabaseParams added in v0.0.6

type DatabaseParams struct {
	DatabaseId   sql.NullString `db:"id"`
	DatabaseName sql.NullString `db:"database_name"`
	Comment      sql.NullString `db:"comment"`
	OwnerName    sql.NullString `db:"owner_name"`
	Privileges   pq.StringArray `db:"privileges"`
}

func ListDatabases added in v0.0.6

func ListDatabases(conn *sqlx.DB) ([]DatabaseParams, error)

func ScanDatabase added in v0.0.6

func ScanDatabase(conn *sqlx.DB, id string) (DatabaseParams, error)

type DefaultPrivilegeBuilder added in v0.1.0

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

func NewDefaultPrivilegeBuilder added in v0.1.0

func NewDefaultPrivilegeBuilder(conn *sqlx.DB, objectType, grantee, target, privilege string) *DefaultPrivilegeBuilder

func (*DefaultPrivilegeBuilder) DatabaseName added in v0.1.0

func (*DefaultPrivilegeBuilder) Grant added in v0.1.0

func (b *DefaultPrivilegeBuilder) Grant() error

func (*DefaultPrivilegeBuilder) GrantKey added in v0.1.3

func (b *DefaultPrivilegeBuilder) GrantKey(region, objectType, granteeId, targetId, databaseId, schemaId, privilege string) string

func (*DefaultPrivilegeBuilder) Revoke added in v0.1.0

func (b *DefaultPrivilegeBuilder) Revoke() error

func (*DefaultPrivilegeBuilder) SchemaName added in v0.1.0

type DefaultPrivilegeParams added in v0.1.0

type DefaultPrivilegeParams struct {
	ObjectType  sql.NullString `db:"object_type"`
	GranteeId   sql.NullString `db:"grantee_id"`
	GranteeName sql.NullString `db:"grantee_name"`
	TargetId    sql.NullString `db:"target_id"`
	TargetName  sql.NullString `db:"target_name"`
	DatabaseId  sql.NullString `db:"database_id"`
	SchemaId    sql.NullString `db:"schema_id"`
	Privileges  sql.NullString `db:"privileges"`
}

func ScanDefaultPrivilege added in v0.1.0

func ScanDefaultPrivilege(conn *sqlx.DB, objectType, granteeId, targetRoleId, databaseId, schemaId string) ([]DefaultPrivilegeParams, error)

type DependencyParams added in v0.1.5

type DependencyParams struct {
	ObjectId          sql.NullString `db:"object_id"`
	ReferenceObjectId sql.NullString `db:"referenced_object_id"`
	ObjectName        sql.NullString `db:"object_name"`
	SchemaName        sql.NullString `db:"schema_name"`
	DatabaseName      sql.NullString `db:"database_name"`
	Type              sql.NullString `db:"type"`
	SourceType        sql.NullString `db:"source_type"`
	FilerId           sql.NullString `db:"filter_id"`
}

func ListDependencies added in v0.1.5

func ListDependencies(conn *sqlx.DB, objectId, objectType string) ([]DependencyParams, error)

type EntityType added in v0.0.6

type EntityType string
const (
	ClusterReplica   EntityType = "CLUSTER REPLICA"
	Cluster          EntityType = "CLUSTER"
	BaseConnection   EntityType = "CONNECTION"
	Database         EntityType = "DATABASE"
	Index            EntityType = "INDEX"
	MaterializedView EntityType = "MATERIALIZED VIEW"
	Privilege        EntityType = "PRIVILEGE"
	Ownership        EntityType = "OWNERSHIP"
	Role             EntityType = "ROLE"
	Schema           EntityType = "SCHEMA"
	BaseSink         EntityType = "SINK"
	BaseSource       EntityType = "SOURCE"
	Secret           EntityType = "SECRET"
	Table            EntityType = "TABLE"
	BaseType         EntityType = "TYPE"
	View             EntityType = "VIEW"
	System           EntityType = "SYSTEM"
)

type FieldStruct added in v0.1.8

type FieldStruct struct {
	Body    bool
	Headers bool
	Secret  IdentifierSchemaStruct
}

type HeaderStruct added in v0.2.1

type HeaderStruct struct {
	Header string
	Alias  string
	Bytes  bool
}

type IdentifierSchemaStruct

type IdentifierSchemaStruct struct {
	Name         string
	SchemaName   string
	DatabaseName string
}

Any Materialize Object. Will contain name and database and schema If no database or schema is provided will inherit those values

func GetIdentifierSchemaStruct

func GetIdentifierSchemaStruct(v interface{}) IdentifierSchemaStruct

func (*IdentifierSchemaStruct) QualifiedName

func (i *IdentifierSchemaStruct) QualifiedName() string

type IncludeHeadersStruct added in v0.2.1

type IncludeHeadersStruct struct {
	All  bool
	Only []string
	Not  []string
}

type IndexBuilder

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

func NewIndexBuilder

func NewIndexBuilder(conn *sqlx.DB, obj MaterializeObject, indexDefault bool, objName IdentifierSchemaStruct) *IndexBuilder

func (*IndexBuilder) ClusterName

func (b *IndexBuilder) ClusterName(c string) *IndexBuilder

func (*IndexBuilder) ColExpr

func (b *IndexBuilder) ColExpr(c []IndexColumn) *IndexBuilder

func (*IndexBuilder) Comment added in v0.1.13

func (b *IndexBuilder) Comment(comment string) error

Requires a specific comment for the way indexes handle qualified name

func (*IndexBuilder) Create

func (b *IndexBuilder) Create() error

func (*IndexBuilder) Drop

func (b *IndexBuilder) Drop() error

func (*IndexBuilder) Method

func (b *IndexBuilder) Method(m string) *IndexBuilder

func (*IndexBuilder) QualifiedName

func (b *IndexBuilder) QualifiedName() string

type IndexColumn

type IndexColumn struct {
	Field string
}

func GetIndexColumnStruct added in v0.0.4

func GetIndexColumnStruct(v []interface{}) []IndexColumn

type IndexColumnParams added in v0.1.5

type IndexColumnParams struct {
	Id            sql.NullString `db:"id"`
	Name          sql.NullString `db:"name"`
	Position      sql.NullString `db:"position"`
	Nullable      sql.NullBool   `db:"nullable"`
	Type          sql.NullString `db:"type"`
	Default       sql.NullString `db:"default"`
	IndexedColumn sql.NullBool   `db:"indexed_column"`
	IndexName     sql.NullString `db:"index_name"`
	IndexId       sql.NullString `db:"index_id"`
}

func ListIndexColumns added in v0.1.5

func ListIndexColumns(conn *sqlx.DB, indexiId string) ([]IndexColumnParams, error)

type IndexParams added in v0.0.6

type IndexParams struct {
	IndexId            sql.NullString `db:"id"`
	IndexName          sql.NullString `db:"index_name"`
	ObjectName         sql.NullString `db:"obj_name"`
	ObjectSchemaName   sql.NullString `db:"obj_schema_name"`
	ObjectDatabaseName sql.NullString `db:"obj_database_name"`
	Comment            sql.NullString `db:"comment"`
}

func ListIndexes added in v0.0.6

func ListIndexes(conn *sqlx.DB, schemaName, databaseName string) ([]IndexParams, error)

func ScanIndex added in v0.0.6

func ScanIndex(conn *sqlx.DB, id string) (IndexParams, error)

type KafkaBroker

type KafkaBroker struct {
	Broker                string
	TargetGroupPort       int
	AvailabilityZone      string
	PrivateLinkConnection IdentifierSchemaStruct
	SSHTunnel             IdentifierSchemaStruct
}

func GetKafkaBrokersStruct added in v0.0.4

func GetKafkaBrokersStruct(v interface{}) []KafkaBroker

type KafkaSinkEnvelopeStruct added in v0.0.4

type KafkaSinkEnvelopeStruct struct {
	Upsert   bool
	Debezium bool
}

func GetSinkKafkaEnelopeStruct added in v0.0.4

func GetSinkKafkaEnelopeStruct(v interface{}) KafkaSinkEnvelopeStruct

type KafkaSourceEnvelopeStruct

type KafkaSourceEnvelopeStruct struct {
	Debezium      bool
	None          bool
	Upsert        bool
	UpsertOptions *UpsertOptionsStruct
}

func GetSourceKafkaEnvelopeStruct added in v0.8.2

func GetSourceKafkaEnvelopeStruct(v interface{}) KafkaSourceEnvelopeStruct

type KeyValueOptions added in v0.6.10

type KeyValueOptions struct {
	Keys                  int
	SnapshotRounds        int
	TransactionalSnapshot bool
	ValueSize             int
	TickInterval          string
	Seed                  uint8
	Partitions            int
	BatchSize             int
}

func GetKeyValueOptionsStruct added in v0.6.10

func GetKeyValueOptionsStruct(v interface{}) KeyValueOptions

type ListProperties added in v0.0.6

type ListProperties struct {
	ElementType string
}

func GetListProperties added in v0.0.6

func GetListProperties(v interface{}) []ListProperties

type MapProperties added in v0.0.6

type MapProperties struct {
	KeyType   string
	ValueType string
}

func GetMapProperties added in v0.0.6

func GetMapProperties(v interface{}) []MapProperties

type MarketingOptions added in v0.0.6

type MarketingOptions struct {
	TickInterval string
}

func GetMarketingOptionsStruct added in v0.0.6

func GetMarketingOptionsStruct(v interface{}) MarketingOptions

type MaterializeObject added in v0.1.10

type MaterializeObject struct {
	ObjectType   string
	Name         string
	SchemaName   string
	DatabaseName string
	ClusterName  string
}

Any Materialize Database Object. Will contain name and optionally database and schema Cluster name only applies to cluster replicas

func GetMaterializeObject added in v0.1.10

func GetMaterializeObject(v interface{}) MaterializeObject

func (*MaterializeObject) QualifiedName added in v0.1.10

func (g *MaterializeObject) QualifiedName() string

type MaterializeRole added in v0.1.1

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

DDL

func (*MaterializeRole) QualifiedName added in v0.1.1

func (b *MaterializeRole) QualifiedName() string

type MaterializedViewBuilder

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

func NewMaterializedViewBuilder

func NewMaterializedViewBuilder(conn *sqlx.DB, obj MaterializeObject) *MaterializedViewBuilder

func (*MaterializedViewBuilder) ClusterName

func (b *MaterializedViewBuilder) ClusterName(clusterName string) *MaterializedViewBuilder

func (*MaterializedViewBuilder) Create

func (b *MaterializedViewBuilder) Create() error

func (*MaterializedViewBuilder) Drop

func (b *MaterializedViewBuilder) Drop() error

func (*MaterializedViewBuilder) NotNullAssertions added in v0.2.1

func (b *MaterializedViewBuilder) NotNullAssertions(notNullAssertions []string) *MaterializedViewBuilder

func (*MaterializedViewBuilder) QualifiedName

func (b *MaterializedViewBuilder) QualifiedName() string

func (*MaterializedViewBuilder) Rename

func (b *MaterializedViewBuilder) Rename(newMaterializedViewName string) error

func (*MaterializedViewBuilder) SelectStmt

func (b *MaterializedViewBuilder) SelectStmt(selectStmt string) *MaterializedViewBuilder

type MaterializedViewParams added in v0.0.6

type MaterializedViewParams struct {
	MaterializedViewId   sql.NullString `db:"id"`
	MaterializedViewName sql.NullString `db:"materialized_view_name"`
	SchemaName           sql.NullString `db:"schema_name"`
	DatabaseName         sql.NullString `db:"database_name"`
	Cluster              sql.NullString `db:"cluster_name"`
	Comment              sql.NullString `db:"comment"`
	OwnerName            sql.NullString `db:"owner_name"`
	Privileges           pq.StringArray `db:"privileges"`
	CreateSQL            sql.NullString `db:"create_sql"`
}

func ListMaterializedViews added in v0.0.6

func ListMaterializedViews(conn *sqlx.DB, schemaName, databaseName string) ([]MaterializedViewParams, error)

func ScanMaterializedView added in v0.0.6

func ScanMaterializedView(conn *sqlx.DB, id string) (MaterializedViewParams, error)

type MzAclItem added in v0.3.1

type MzAclItem struct {
	Grantee    string
	Privileges []string
	Grantor    string
}

func ParseMzAclString added in v0.3.1

func ParseMzAclString(aclString string) MzAclItem

https://materialize.com/docs/sql/types/mz_aclitem/ Converts a mz catalog privilege string into a struct "s1=arwd/s1" would become

var x = MzAclItem{
	Grantee:    "s1",
	Privileges: ["INSERT", "SELECT", "UPDATE", "DELETE"],
	Grantor:    "s1",
}

type ObjectType added in v0.0.5

type ObjectType struct {
	Permissions []string
}

type OnRefreshConfig added in v0.7.0

type OnRefreshConfig struct {
	Enabled                 bool
	HydrationTimeEstimate   string
	RehydrationTimeEstimate string
}

type OwnershipBuilder added in v0.0.5

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

func NewOwnershipBuilder added in v0.0.5

func NewOwnershipBuilder(conn *sqlx.DB, object MaterializeObject) *OwnershipBuilder

func (*OwnershipBuilder) Alter added in v0.0.5

func (b *OwnershipBuilder) Alter(roleName string) error

func (*OwnershipBuilder) Object added in v0.0.5

type PrivilegeBuilder added in v0.0.8

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

func NewPrivilegeBuilder added in v0.0.8

func NewPrivilegeBuilder(conn *sqlx.DB, role, privilege string, obj MaterializeObject) *PrivilegeBuilder

func (*PrivilegeBuilder) Grant added in v0.0.8

func (b *PrivilegeBuilder) Grant() error

func (*PrivilegeBuilder) GrantKey added in v0.1.3

func (b *PrivilegeBuilder) GrantKey(region, objectId, roleId, privilege string) string

func (*PrivilegeBuilder) Revoke added in v0.0.8

func (b *PrivilegeBuilder) Revoke() error

type ProtobufFormatSpec

type ProtobufFormatSpec struct {
	SchemaRegistryConnection IdentifierSchemaStruct
	MessageName              string
}

type RawSQL added in v0.6.10

type RawSQL string

type ReconfigurationOptions added in v0.8.8

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

type RoleBuilder added in v0.0.4

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

func NewRoleBuilder added in v0.0.4

func NewRoleBuilder(conn *sqlx.DB, obj MaterializeObject) *RoleBuilder

func (*RoleBuilder) Alter added in v0.0.4

func (b *RoleBuilder) Alter(permission string) error

func (*RoleBuilder) Create added in v0.0.4

func (b *RoleBuilder) Create() error

func (*RoleBuilder) Drop added in v0.0.4

func (b *RoleBuilder) Drop() error

func (*RoleBuilder) Inherit added in v0.0.4

func (b *RoleBuilder) Inherit() *RoleBuilder

func (*RoleBuilder) QualifiedName added in v0.0.4

func (b *RoleBuilder) QualifiedName() string

type RoleParameterBuilder added in v0.6.9

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

func NewRoleParameterBuilder added in v0.6.9

func NewRoleParameterBuilder(conn *sqlx.DB, roleName, variableName, variableValue string) *RoleParameterBuilder

func (*RoleParameterBuilder) Reset added in v0.6.9

func (b *RoleParameterBuilder) Reset() error

func (*RoleParameterBuilder) Set added in v0.6.9

func (b *RoleParameterBuilder) Set() error

type RoleParams added in v0.0.6

type RoleParams struct {
	RoleId   sql.NullString `db:"id"`
	RoleName sql.NullString `db:"role_name"`
	Inherit  sql.NullBool   `db:"inherit"`
	Comment  sql.NullString `db:"comment"`
}

func ListRoles added in v0.0.6

func ListRoles(conn *sqlx.DB) ([]RoleParams, error)

func ScanRole added in v0.0.6

func ScanRole(conn *sqlx.DB, id string) (RoleParams, error)

type RolePrivilegeBuilder added in v0.1.0

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

func NewRolePrivilegeBuilder added in v0.1.0

func NewRolePrivilegeBuilder(conn *sqlx.DB, role, member string) *RolePrivilegeBuilder

func (*RolePrivilegeBuilder) Grant added in v0.1.0

func (b *RolePrivilegeBuilder) Grant() error

func (*RolePrivilegeBuilder) GrantKey added in v0.1.3

func (b *RolePrivilegeBuilder) GrantKey(region, roleId, memberId string) string

func (*RolePrivilegeBuilder) Revoke added in v0.1.0

func (b *RolePrivilegeBuilder) Revoke() error

type RolePrivilegeParams added in v0.1.0

type RolePrivilegeParams struct {
	RoleId  sql.NullString `db:"role_id"`
	Member  sql.NullString `db:"member"`
	Grantor sql.NullString `db:"grantor"`
}

func ScanRolePrivilege added in v0.1.0

func ScanRolePrivilege(conn *sqlx.DB, roleId, memberId string) ([]RolePrivilegeParams, error)

type RowProperties added in v0.3.3

type RowProperties struct {
	FieldName string
	FieldType string
}

func GetRowProperties added in v0.3.3

func GetRowProperties(v interface{}) []RowProperties

type SchedulingConfig added in v0.7.0

type SchedulingConfig struct {
	OnRefresh OnRefreshConfig
	IsSet     bool
}

func GetSchedulingConfig added in v0.7.0

func GetSchedulingConfig(v interface{}) SchedulingConfig

type SchemaBuilder

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

DDL

func NewSchemaBuilder

func NewSchemaBuilder(conn *sqlx.DB, obj MaterializeObject) *SchemaBuilder

func (*SchemaBuilder) Create

func (b *SchemaBuilder) Create() error

func (*SchemaBuilder) Drop

func (b *SchemaBuilder) Drop() error

func (*SchemaBuilder) QualifiedName

func (b *SchemaBuilder) QualifiedName() string

func (*SchemaBuilder) Rename added in v0.6.6

func (b *SchemaBuilder) Rename(newName string) error

type SchemaParams added in v0.0.6

type SchemaParams struct {
	SchemaId     sql.NullString `db:"id"`
	SchemaName   sql.NullString `db:"schema_name"`
	DatabaseName sql.NullString `db:"database_name"`
	Comment      sql.NullString `db:"comment"`
	OwnerName    sql.NullString `db:"owner_name"`
	Privileges   pq.StringArray `db:"privileges"`
}

DML

func ListSchemas added in v0.0.6

func ListSchemas(conn *sqlx.DB, databaseName string) ([]SchemaParams, error)

func ScanSchema added in v0.0.6

func ScanSchema(conn *sqlx.DB, id string) (SchemaParams, error)

type SecretBuilder

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

DDL

func NewSecretBuilder

func NewSecretBuilder(conn *sqlx.DB, obj MaterializeObject) *SecretBuilder

func (*SecretBuilder) Create

func (b *SecretBuilder) Create() error

func (*SecretBuilder) Drop

func (b *SecretBuilder) Drop() error

func (*SecretBuilder) QualifiedName

func (b *SecretBuilder) QualifiedName() string

func (*SecretBuilder) Rename

func (b *SecretBuilder) Rename(newName string) error

func (*SecretBuilder) UpdateValue

func (b *SecretBuilder) UpdateValue(newValue string) error

func (*SecretBuilder) Value added in v0.0.6

func (b *SecretBuilder) Value(v string) *SecretBuilder

type SecretParams added in v0.0.6

type SecretParams struct {
	SecretId     sql.NullString `db:"id"`
	SecretName   sql.NullString `db:"name"`
	SchemaName   sql.NullString `db:"schema_name"`
	DatabaseName sql.NullString `db:"database_name"`
	Comment      sql.NullString `db:"comment"`
	OwnerName    sql.NullString `db:"owner_name"`
	Privileges   pq.StringArray `db:"privileges"`
}

DML

func ListSecrets added in v0.0.6

func ListSecrets(conn *sqlx.DB, schemaName, databaseName string) ([]SecretParams, error)

func ScanSecret added in v0.0.6

func ScanSecret(conn *sqlx.DB, id string) (SecretParams, error)

type Sink

type Sink struct {
	SinkName     string
	SchemaName   string
	DatabaseName string
	// contains filtered or unexported fields
}

func NewSink added in v0.0.6

func NewSink(conn *sqlx.DB, obj MaterializeObject) *Sink

func (*Sink) AlterFrom added in v0.8.1

func (b *Sink) AlterFrom(from IdentifierSchemaStruct) error

func (*Sink) Drop added in v0.0.6

func (b *Sink) Drop() error

func (*Sink) QualifiedName

func (s *Sink) QualifiedName() string

func (*Sink) Rename added in v0.0.6

func (b *Sink) Rename(newName string) error

type SinkAvroFormatSpec

type SinkAvroFormatSpec struct {
	SchemaRegistryConnection IdentifierSchemaStruct
	AvroKeyFullname          string
	AvroValueFullname        string
	DocType                  AvroDocType
	DocColumn                []AvroDocColumn
	KeyCompatibilityLevel    string
	ValueCompatibilityLevel  string
}

type SinkFormatSpecStruct

type SinkFormatSpecStruct struct {
	Avro *SinkAvroFormatSpec
	Json bool
}

func GetSinkFormatSpecStruc

func GetSinkFormatSpecStruc(v interface{}) SinkFormatSpecStruct

type SinkKafkaBuilder

type SinkKafkaBuilder struct {
	Sink
	// contains filtered or unexported fields
}

func NewSinkKafkaBuilder

func NewSinkKafkaBuilder(conn *sqlx.DB, obj MaterializeObject) *SinkKafkaBuilder

func (*SinkKafkaBuilder) ClusterName

func (b *SinkKafkaBuilder) ClusterName(c string) *SinkKafkaBuilder

func (*SinkKafkaBuilder) CompressionType added in v0.4.2

func (b *SinkKafkaBuilder) CompressionType(c string) *SinkKafkaBuilder

func (*SinkKafkaBuilder) Create

func (b *SinkKafkaBuilder) Create() error

func (*SinkKafkaBuilder) Envelope

func (*SinkKafkaBuilder) Format

func (*SinkKafkaBuilder) From

func (*SinkKafkaBuilder) Headers added in v0.8.2

func (b *SinkKafkaBuilder) Headers(h string) *SinkKafkaBuilder

func (*SinkKafkaBuilder) KafkaConnection

func (*SinkKafkaBuilder) Key

func (*SinkKafkaBuilder) KeyNotEnforced added in v0.3.0

func (b *SinkKafkaBuilder) KeyNotEnforced(s bool) *SinkKafkaBuilder

func (*SinkKafkaBuilder) PartitionBy added in v0.8.10

func (b *SinkKafkaBuilder) PartitionBy(expr string) *SinkKafkaBuilder

func (*SinkKafkaBuilder) Size

func (*SinkKafkaBuilder) Snapshot

func (b *SinkKafkaBuilder) Snapshot(s bool) *SinkKafkaBuilder

func (*SinkKafkaBuilder) Topic

func (*SinkKafkaBuilder) TopicConfig added in v0.8.4

func (b *SinkKafkaBuilder) TopicConfig(config map[string]string) *SinkKafkaBuilder

func (*SinkKafkaBuilder) TopicPartitionCount added in v0.8.4

func (b *SinkKafkaBuilder) TopicPartitionCount(count int) *SinkKafkaBuilder

func (*SinkKafkaBuilder) TopicReplicationFactor added in v0.8.4

func (b *SinkKafkaBuilder) TopicReplicationFactor(factor int) *SinkKafkaBuilder

type SinkParams added in v0.0.6

type SinkParams struct {
	SinkId         sql.NullString `db:"id"`
	SinkName       sql.NullString `db:"name"`
	SchemaName     sql.NullString `db:"schema_name"`
	DatabaseName   sql.NullString `db:"database_name"`
	SinkType       sql.NullString `db:"sink_type"`
	Size           sql.NullString `db:"size"`
	EnvelopeType   sql.NullString `db:"envelope_type"`
	ConnectionName sql.NullString `db:"connection_name"`
	ClusterName    sql.NullString `db:"cluster_name"`
	Comment        sql.NullString `db:"comment"`
	OwnerName      sql.NullString `db:"owner_name"`
}

func ListSinks added in v0.0.6

func ListSinks(conn *sqlx.DB, schemaName, databaseName string) ([]SinkParams, error)

func ScanSink added in v0.0.6

func ScanSink(conn *sqlx.DB, id string) (SinkParams, error)

type Source

type Source struct {
	SourceName   string
	SchemaName   string
	DatabaseName string
	// contains filtered or unexported fields
}

func NewSource added in v0.0.6

func NewSource(conn *sqlx.DB, obj MaterializeObject) *Source

func (*Source) AddSubsource added in v0.1.7

func (b *Source) AddSubsource(subsources []TableStruct, textColumns []string) error

func (*Source) Drop added in v0.0.6

func (b *Source) Drop() error

func (*Source) DropCascade added in v0.8.0

func (b *Source) DropCascade() error

func (*Source) DropSubsource added in v0.1.7

func (b *Source) DropSubsource(subsources []TableStruct) error

func (*Source) QualifiedName

func (s *Source) QualifiedName() string

func (*Source) Rename added in v0.0.6

func (b *Source) Rename(newConnectionName string) error

type SourceFormatSpecStruct added in v0.0.8

type SourceFormatSpecStruct struct {
	Avro     *AvroFormatSpec
	Protobuf *ProtobufFormatSpec
	Csv      *CsvFormatSpec
	Bytes    bool
	Text     bool
	Json     bool
}

func GetFormatSpecStruc

func GetFormatSpecStruc(v interface{}) SourceFormatSpecStruct

type SourceKafkaBuilder

type SourceKafkaBuilder struct {
	Source
	// contains filtered or unexported fields
}

func NewSourceKafkaBuilder

func NewSourceKafkaBuilder(conn *sqlx.DB, obj MaterializeObject) *SourceKafkaBuilder

func (*SourceKafkaBuilder) ClusterName

func (b *SourceKafkaBuilder) ClusterName(c string) *SourceKafkaBuilder

func (*SourceKafkaBuilder) Create

func (b *SourceKafkaBuilder) Create() error

func (*SourceKafkaBuilder) Envelope

func (*SourceKafkaBuilder) ExposeProgress added in v0.1.0

func (*SourceKafkaBuilder) Format

func (*SourceKafkaBuilder) IncludeHeaders

func (b *SourceKafkaBuilder) IncludeHeaders() *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeHeadersAlias added in v0.1.3

func (b *SourceKafkaBuilder) IncludeHeadersAlias(alias string) *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeKey

func (b *SourceKafkaBuilder) IncludeKey() *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeKeyAlias added in v0.1.3

func (b *SourceKafkaBuilder) IncludeKeyAlias(alias string) *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeOffset

func (b *SourceKafkaBuilder) IncludeOffset() *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeOffsetAlias added in v0.1.3

func (b *SourceKafkaBuilder) IncludeOffsetAlias(alias string) *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludePartition

func (b *SourceKafkaBuilder) IncludePartition() *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludePartitionAlias added in v0.1.3

func (b *SourceKafkaBuilder) IncludePartitionAlias(alias string) *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeTimestamp

func (b *SourceKafkaBuilder) IncludeTimestamp() *SourceKafkaBuilder

func (*SourceKafkaBuilder) IncludeTimestampAlias added in v0.1.3

func (b *SourceKafkaBuilder) IncludeTimestampAlias(alias string) *SourceKafkaBuilder

func (*SourceKafkaBuilder) KafkaConnection

func (*SourceKafkaBuilder) KeyFormat

func (*SourceKafkaBuilder) Size

func (*SourceKafkaBuilder) StartOffset

func (b *SourceKafkaBuilder) StartOffset(s []int) *SourceKafkaBuilder

func (*SourceKafkaBuilder) StartTimestamp

func (b *SourceKafkaBuilder) StartTimestamp(s int) *SourceKafkaBuilder

func (*SourceKafkaBuilder) Topic

func (*SourceKafkaBuilder) ValueFormat

type SourceLoadgenBuilder

type SourceLoadgenBuilder struct {
	Source
	// contains filtered or unexported fields
}

func NewSourceLoadgenBuilder

func NewSourceLoadgenBuilder(conn *sqlx.DB, obj MaterializeObject) *SourceLoadgenBuilder

func (*SourceLoadgenBuilder) AuctionOptions

func (*SourceLoadgenBuilder) ClusterName

func (*SourceLoadgenBuilder) CounterOptions

func (*SourceLoadgenBuilder) Create

func (b *SourceLoadgenBuilder) Create() error

func (*SourceLoadgenBuilder) ExposeProgress added in v0.3.3

func (*SourceLoadgenBuilder) KeyValueOptions added in v0.6.10

func (*SourceLoadgenBuilder) LoadGeneratorType

func (b *SourceLoadgenBuilder) LoadGeneratorType(l string) *SourceLoadgenBuilder

func (*SourceLoadgenBuilder) MarketingOptions added in v0.0.6

func (*SourceLoadgenBuilder) Size

func (*SourceLoadgenBuilder) TPCHOptions

type SourceMySQLBuilder added in v0.6.7

type SourceMySQLBuilder struct {
	Source
	// contains filtered or unexported fields
}

func NewSourceMySQLBuilder added in v0.6.7

func NewSourceMySQLBuilder(conn *sqlx.DB, obj MaterializeObject) *SourceMySQLBuilder

func (*SourceMySQLBuilder) ClusterName added in v0.6.7

func (b *SourceMySQLBuilder) ClusterName(c string) *SourceMySQLBuilder

func (*SourceMySQLBuilder) Create added in v0.6.7

func (b *SourceMySQLBuilder) Create() error

func (*SourceMySQLBuilder) ExposeProgress added in v0.8.0

func (*SourceMySQLBuilder) IgnoreColumns added in v0.6.7

func (b *SourceMySQLBuilder) IgnoreColumns(i []string) *SourceMySQLBuilder

func (*SourceMySQLBuilder) MySQLConnection added in v0.6.7

func (b *SourceMySQLBuilder) MySQLConnection(mysqlConn IdentifierSchemaStruct) *SourceMySQLBuilder

func (*SourceMySQLBuilder) Size added in v0.6.7

func (*SourceMySQLBuilder) Tables added in v0.6.7

func (b *SourceMySQLBuilder) Tables(tables []TableStruct) *SourceMySQLBuilder

func (*SourceMySQLBuilder) TextColumns added in v0.6.7

func (b *SourceMySQLBuilder) TextColumns(t []string) *SourceMySQLBuilder

type SourceParams added in v0.0.6

type SourceParams struct {
	SourceId       sql.NullString `db:"id"`
	SourceName     sql.NullString `db:"name"`
	SchemaName     sql.NullString `db:"schema_name"`
	DatabaseName   sql.NullString `db:"database_name"`
	SourceType     sql.NullString `db:"source_type"`
	Size           sql.NullString `db:"size"`
	EnvelopeType   sql.NullString `db:"envelope_type"`
	ConnectionName sql.NullString `db:"connection_name"`
	ClusterName    sql.NullString `db:"cluster_name"`
	Comment        sql.NullString `db:"comment"`
	OwnerName      sql.NullString `db:"owner_name"`
	Privileges     pq.StringArray `db:"privileges"`
}

func ListSources added in v0.0.6

func ListSources(conn *sqlx.DB, schemaName, databaseName string) ([]SourceParams, error)

func ScanSource added in v0.0.6

func ScanSource(conn *sqlx.DB, id string) (SourceParams, error)

type SourcePostgresBuilder

type SourcePostgresBuilder struct {
	Source
	// contains filtered or unexported fields
}

func NewSourcePostgresBuilder

func NewSourcePostgresBuilder(conn *sqlx.DB, obj MaterializeObject) *SourcePostgresBuilder

func (*SourcePostgresBuilder) ClusterName

func (*SourcePostgresBuilder) Create

func (b *SourcePostgresBuilder) Create() error

func (*SourcePostgresBuilder) ExposeProgress added in v0.1.0

func (*SourcePostgresBuilder) PostgresConnection

func (*SourcePostgresBuilder) Publication

func (*SourcePostgresBuilder) Size

func (*SourcePostgresBuilder) Table

func (*SourcePostgresBuilder) TextColumns

func (b *SourcePostgresBuilder) TextColumns(t []string) *SourcePostgresBuilder

type SourceWebhookBuilder added in v0.1.8

type SourceWebhookBuilder struct {
	Source
	// contains filtered or unexported fields
}

func NewSourceWebhookBuilder added in v0.1.8

func NewSourceWebhookBuilder(conn *sqlx.DB, obj MaterializeObject) *SourceWebhookBuilder

func (*SourceWebhookBuilder) BodyFormat added in v0.1.8

func (*SourceWebhookBuilder) CheckExpression added in v0.1.8

func (b *SourceWebhookBuilder) CheckExpression(e string) *SourceWebhookBuilder

func (*SourceWebhookBuilder) CheckOptions added in v0.1.8

func (*SourceWebhookBuilder) ClusterName added in v0.1.8

func (*SourceWebhookBuilder) Create added in v0.1.8

func (b *SourceWebhookBuilder) Create() error

func (*SourceWebhookBuilder) IncludeHeader added in v0.2.1

func (*SourceWebhookBuilder) IncludeHeaders added in v0.1.8

func (*SourceWebhookBuilder) Size added in v0.1.8

type SubsourceDetail added in v0.8.0

type SubsourceDetail struct {
	ObjectId                sql.NullString `db:"object_id"`
	ReferenceObjectId       sql.NullString `db:"referenced_object_id"`
	ObjectName              sql.NullString `db:"object_name"`
	ObjectSchemaName        sql.NullString `db:"schema_name"`
	ObjectDatabaseName      sql.NullString `db:"database_name"`
	Type                    sql.NullString `db:"type"`
	UpstreamTableName       sql.NullString `db:"upstream_table_name"`
	UpstreamTableSchemaName sql.NullString `db:"upstream_table_schema"`
}

func ListMysqlSubsources added in v0.8.0

func ListMysqlSubsources(conn *sqlx.DB, sourceId string, objectType string) ([]SubsourceDetail, error)

func ListPostgresSubsources added in v0.8.0

func ListPostgresSubsources(conn *sqlx.DB, sourceId string, objectType string) ([]SubsourceDetail, error)

type SystemParameterBuilder added in v0.6.4

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

func NewSystemParameterBuilder added in v0.6.4

func NewSystemParameterBuilder(conn *sqlx.DB, paramName, paramValue string) *SystemParameterBuilder

func (*SystemParameterBuilder) Reset added in v0.6.4

func (b *SystemParameterBuilder) Reset() error

func (*SystemParameterBuilder) Set added in v0.6.4

func (b *SystemParameterBuilder) Set() error

type SystemPrivilegeBuilder added in v0.1.0

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

func NewSystemPrivilegeBuilder added in v0.1.0

func NewSystemPrivilegeBuilder(conn *sqlx.DB, role, privilege string) *SystemPrivilegeBuilder

func (*SystemPrivilegeBuilder) Grant added in v0.1.0

func (b *SystemPrivilegeBuilder) Grant() error

func (*SystemPrivilegeBuilder) GrantKey added in v0.1.3

func (b *SystemPrivilegeBuilder) GrantKey(region, roleId, privilege string) string

func (*SystemPrivilegeBuilder) Revoke added in v0.1.0

func (b *SystemPrivilegeBuilder) Revoke() error

type SytemPrivilegeParams added in v0.1.0

type SytemPrivilegeParams struct {
	Privileges string `db:"privileges"`
}

func ScanSystemPrivileges added in v0.1.0

func ScanSystemPrivileges(conn *sqlx.DB) ([]SytemPrivilegeParams, error)

type TPCHOptions

type TPCHOptions struct {
	TickInterval string
	ScaleFactor  float64
}

func GetTPCHOptionsStruct added in v0.0.4

func GetTPCHOptionsStruct(v interface{}) TPCHOptions

type TableBuilder

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

DDL Not including TEMP / TEMPORARY since a user would not use Terraform for temporary table

func NewTableBuilder

func NewTableBuilder(conn *sqlx.DB, obj MaterializeObject) *TableBuilder

func (*TableBuilder) Column

func (b *TableBuilder) Column(c []TableColumn) *TableBuilder

func (*TableBuilder) Create

func (b *TableBuilder) Create() error

func (*TableBuilder) Drop

func (b *TableBuilder) Drop() error

func (*TableBuilder) QualifiedName

func (b *TableBuilder) QualifiedName() string

func (*TableBuilder) Rename

func (b *TableBuilder) Rename(newName string) error

type TableColumn

type TableColumn struct {
	ColName string
	ColType string
	NotNull bool
	Default string
	Comment string
}

func GetTableColumnStruct added in v0.0.4

func GetTableColumnStruct(v []interface{}) []TableColumn

type TableColumnParams added in v0.1.5

type TableColumnParams struct {
	Id       sql.NullString `db:"id"`
	Name     sql.NullString `db:"name"`
	Position sql.NullString `db:"position"`
	Nullable sql.NullBool   `db:"nullable"`
	Comment  sql.NullString `db:"comment"`
	Type     sql.NullString `db:"type"`
	Default  sql.NullString `db:"default"`
}

func ListTableColumns added in v0.1.5

func ListTableColumns(conn *sqlx.DB, objectId string) ([]TableColumnParams, error)

type TableParams added in v0.0.6

type TableParams struct {
	TableId      sql.NullString `db:"id"`
	TableName    sql.NullString `db:"name"`
	SchemaName   sql.NullString `db:"schema_name"`
	DatabaseName sql.NullString `db:"database_name"`
	Comment      sql.NullString `db:"comment"`
	OwnerName    sql.NullString `db:"owner_name"`
	Privileges   pq.StringArray `db:"privileges"`
}

func ListTables added in v0.0.6

func ListTables(conn *sqlx.DB, schemaName, databaseName string) ([]TableParams, error)

func ScanTable added in v0.0.6

func ScanTable(conn *sqlx.DB, id string) (TableParams, error)

type TableStruct added in v0.0.6

type TableStruct struct {
	Name               string
	SchemaName         string
	DatabaseName       string
	UpstreamName       string
	UpstreamSchemaName string
}

func DiffTableStructs added in v0.1.7

func DiffTableStructs(arr1, arr2 []interface{}) []TableStruct

func GetTableStruct added in v0.0.4

func GetTableStruct(v []interface{}) []TableStruct

type Type added in v0.0.6

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

func NewTypeBuilder added in v0.0.6

func NewTypeBuilder(conn *sqlx.DB, obj MaterializeObject) *Type

func (*Type) Create added in v0.0.6

func (b *Type) Create() error

func (*Type) Drop added in v0.0.6

func (b *Type) Drop() error

func (*Type) ListProperties added in v0.0.6

func (b *Type) ListProperties(l []ListProperties) *Type

func (*Type) MapProperties added in v0.0.6

func (b *Type) MapProperties(m []MapProperties) *Type

func (*Type) QualifiedName added in v0.0.6

func (c *Type) QualifiedName() string

func (*Type) RowProperties added in v0.3.3

func (b *Type) RowProperties(r []RowProperties) *Type

type TypeParams added in v0.0.6

type TypeParams struct {
	TypeId       sql.NullString `db:"id"`
	TypeName     sql.NullString `db:"name"`
	SchemaName   sql.NullString `db:"schema_name"`
	DatabaseName sql.NullString `db:"database_name"`
	Category     sql.NullString `db:"category"`
	Comment      sql.NullString `db:"comment"`
	OwnerName    sql.NullString `db:"owner_name"`
	Privileges   pq.StringArray `db:"privileges"`
}

func ListTypes added in v0.0.6

func ListTypes(conn *sqlx.DB, schemaName, databaseName string) ([]TypeParams, error)

func ScanType added in v0.0.6

func ScanType(conn *sqlx.DB, id string) (TypeParams, error)

type UpsertOptionsStruct added in v0.8.2

type UpsertOptionsStruct struct {
	ValueDecodingErrors struct {
		Inline struct {
			Enabled bool
			Alias   string
		}
	}
}

type ValueSecretStruct

type ValueSecretStruct struct {
	Text   string
	Secret IdentifierSchemaStruct
}

func GetValueSecretStruct added in v0.0.4

func GetValueSecretStruct(v interface{}) ValueSecretStruct

type ViewBuilder

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

DDL Not including TEMP / TEMPORARY since a user would not use Terraform for temporary view

func NewViewBuilder

func NewViewBuilder(conn *sqlx.DB, obj MaterializeObject) *ViewBuilder

func (*ViewBuilder) Create

func (b *ViewBuilder) Create() error

func (*ViewBuilder) Drop

func (b *ViewBuilder) Drop() error

func (*ViewBuilder) QualifiedName

func (b *ViewBuilder) QualifiedName() string

func (*ViewBuilder) Rename

func (b *ViewBuilder) Rename(newName string) error

func (*ViewBuilder) SelectStmt

func (b *ViewBuilder) SelectStmt(selectStmt string) *ViewBuilder

type ViewParams added in v0.0.6

type ViewParams struct {
	ViewId       sql.NullString `db:"id"`
	ViewName     sql.NullString `db:"name"`
	SchemaName   sql.NullString `db:"schema_name"`
	DatabaseName sql.NullString `db:"database_name"`
	Comment      sql.NullString `db:"comment"`
	OwnerName    sql.NullString `db:"owner_name"`
	Privileges   pq.StringArray `db:"privileges"`
	CreateSQL    sql.NullString `db:"create_sql"`
}

DML

func ListViews added in v0.0.6

func ListViews(conn *sqlx.DB, schemaName, databaseName string) ([]ViewParams, error)

func ScanView added in v0.0.6

func ScanView(conn *sqlx.DB, id string) (ViewParams, error)

Jump to

Keyboard shortcuts

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