db

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsClusterKeyColumn

func IsClusterKeyColumn(col gocql.ColumnInfo, s *gocql.Session) bool

func IsPartitionKeyColumn

func IsPartitionKeyColumn(col gocql.ColumnInfo, s *gocql.Session) bool

func IsStringColumn

func IsStringColumn(col gocql.ColumnInfo) bool

func NewSession added in v0.0.3

func NewSession(host string, port int, keyspace string) (*gocql.Session, func(), error)

Types

type CQLKeyspaceSession

type CQLKeyspaceSession struct {
	Host             string
	Port             int
	Session          *gocql.Session
	ActiveKeyspace   string
	NewSchema        bool
	IsInitialized    bool
	CloseSessionFunc func()
	TracingEnabled   bool
}

func (*CQLKeyspaceSession) CloneSession added in v0.0.3

func (cks *CQLKeyspaceSession) CloneSession() (*gocql.Session, func(), error)

func (*CQLKeyspaceSession) DisableTracing added in v0.0.3

func (cks *CQLKeyspaceSession) DisableTracing()

func (*CQLKeyspaceSession) EnableTracing added in v0.0.3

func (cks *CQLKeyspaceSession) EnableTracing()

func (*CQLKeyspaceSession) FetchColumns

func (cks *CQLKeyspaceSession) FetchColumns(tableName string) (map[string]*gocql.ColumnMetadata, error)

func (*CQLKeyspaceSession) FetchKeyspaces

func (cks *CQLKeyspaceSession) FetchKeyspaces() ([]string, error)

FetchKeyspaces obtains the list of all keyspaces available

func (*CQLKeyspaceSession) FetchTables

func (cks *CQLKeyspaceSession) FetchTables() ([]string, error)

FetchTables returns a list of all tables in the Active keyspace

func (*CQLKeyspaceSession) Init

func (cks *CQLKeyspaceSession) Init()

Init method for switching the new/old schema detection

Jump to

Keyboard shortcuts

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