Documentation ¶
Index ¶
- Constants
- Variables
- func CreateDDLFromTableSpecification(keyspace string, spec *metadata.TableSpecification, ...) ([]metadata.DDLOperation, error)
- func CreateDDLFromViewSpecification(keyspace string, spec *metadata.ViewSpecification, ...) ([]metadata.DDLOperation, error)
- func DescribeKeyspaceMetadata(sess gocqlx.Session, keyspace string) (*gocql.KeyspaceMetadata, error)
- func DescribeTableMetadata(sess gocqlx.Session, keyspace string, tableName string) (*tableMetadata, error)
- func DescribeViewMetadata(sess gocqlx.Session, keyspace string, viewName string) (*gocql.ViewMetadata, error)
- func WithAutomaticTableManagement(log *zap.Logger, clusterFn utils.ClusterConfigGeneratorFn) tables.ManagerOption
- func WithAutomaticViewManagement(log *zap.Logger, cluster utils.ClusterConfigGeneratorFn) tables.ManagerOption
- func WithNetworkAwareKeyspaceManagement(log *zap.Logger, cluster utils.ClusterConfigGeneratorFn, ...) tables.ManagerOption
- func WithSimpleKeyspaceManagement(log *zap.Logger, cluster utils.ClusterConfigGeneratorFn, replicationFactor int) tables.ManagerOption
Constants ¶
const (
// MessageColumnExists is a fragment of the CQL error we see when a column already exists.
MessageColumnExists = "conflicts with an existing column"
)
Variables ¶
var ErrInvalidInput = errors.New("invalid input or object not specified")
ErrInvalidInput indicates an input object was not specifier
Functions ¶
func CreateDDLFromTableSpecification ¶
func CreateDDLFromTableSpecification(keyspace string, spec *metadata.TableSpecification, existingMetadata *tableMetadata) ([]metadata.DDLOperation, error)
CreateDDLFromTableSpecification creates the DDL to create and extend a table from its table specification
func CreateDDLFromViewSpecification ¶
func CreateDDLFromViewSpecification(keyspace string, spec *metadata.ViewSpecification, existing *gocql.ViewMetadata) ([]metadata.DDLOperation, error)
CreateDDLFromViewSpecification creates the DDL to create a view from its spec
func DescribeKeyspaceMetadata ¶
func DescribeKeyspaceMetadata(sess gocqlx.Session, keyspace string) (*gocql.KeyspaceMetadata, error)
DescribeKeyspaceMetadata reads the schema of a keyspace from the database
func DescribeTableMetadata ¶
func DescribeTableMetadata(sess gocqlx.Session, keyspace string, tableName string) (*tableMetadata, error)
DescribeTableMetadata reads the schema of a table in a given keyspace schema from the database
func DescribeViewMetadata ¶
func DescribeViewMetadata(sess gocqlx.Session, keyspace string, viewName string) (*gocql.ViewMetadata, error)
DescribeViewMetadata reads the schema of a view in a given keyspace schema from the database
func WithAutomaticTableManagement ¶
func WithAutomaticTableManagement(log *zap.Logger, clusterFn utils.ClusterConfigGeneratorFn) tables.ManagerOption
WithAutomaticTableManagement automatically performs management of tables and structures on startup when using a tables.TableManager, using the charybdis DDL generator.
func WithAutomaticViewManagement ¶
func WithAutomaticViewManagement(log *zap.Logger, cluster utils.ClusterConfigGeneratorFn) tables.ManagerOption
WithAutomaticViewManagement automatically performs management of views and structures on startup when using a tables.ViewManager, using the charybdis DDL generator.
func WithNetworkAwareKeyspaceManagement ¶
func WithNetworkAwareKeyspaceManagement(log *zap.Logger, cluster utils.ClusterConfigGeneratorFn, replicationFactors map[string]int32) tables.ManagerOption
WithNetworkAwareKeyspaceManagement creates a network aware keyspace
func WithSimpleKeyspaceManagement ¶
func WithSimpleKeyspaceManagement(log *zap.Logger, cluster utils.ClusterConfigGeneratorFn, replicationFactor int) tables.ManagerOption
WithSimpleKeyspaceManagement does a 'CREATE KEYSPACE' command at the startup, with a default replication factor. This should only be used for trivial scenarios.
Types ¶
This section is empty.