cassandra

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CQLClient

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

func NewCQLClient

func NewCQLClient(cfg *CQLClientConfig, logger log.Logger) (*CQLClient, error)

NewCQLClient returns a new instance of CQLClient

func (*CQLClient) Close

func (client *CQLClient) Close()

Close closes the cql client

func (*CQLClient) CreateDatabase

func (client *CQLClient) CreateDatabase(name string) error

func (*CQLClient) CreateSchemaVersionTables

func (client *CQLClient) CreateSchemaVersionTables() error

CreateSchemaVersionTables sets up the schema version tables

func (*CQLClient) DropAllTables

func (client *CQLClient) DropAllTables() error

func (*CQLClient) DropDatabase

func (client *CQLClient) DropDatabase(name string) error

func (*CQLClient) Exec

func (client *CQLClient) Exec(stmt string, args ...interface{}) error

Exec executes a cql statement

func (*CQLClient) ListTables

func (client *CQLClient) ListTables() ([]string, error)

ListTables lists the table names in a Keyspace

func (*CQLClient) ReadSchemaVersion

func (client *CQLClient) ReadSchemaVersion() (string, error)

ReadSchemaVersion returns the current schema version for the Keyspace

func (*CQLClient) UpdateSchemaVersion

func (client *CQLClient) UpdateSchemaVersion(newVersion string, minCompatibleVersion string) error

UpdateShemaVersion updates the schema version for the Keyspace

func (*CQLClient) WriteSchemaUpdateLog

func (client *CQLClient) WriteSchemaUpdateLog(oldVersion string, newVersion string, manifestMD5 string, desc string) error

WriteSchemaUpdateLog adds an entry to the schema update history table

type CQLClientConfig

type CQLClientConfig struct {
	Hosts    string
	Port     int
	User     string
	Password string
	Keyspace string
	Timeout  int

	Datacenter               string
	Consistency              string
	TLS                      *auth.TLS
	DisableInitialHostLookup bool
	// contains filtered or unexported fields
}

CQLClientConfig contains the configuration for cql client

Jump to

Keyboard shortcuts

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