scylla

package
v0.0.0-...-a2a535d Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKeyspace

func CreateKeyspace(contactPoint string, port int, keyspace string) error

func TryToConnectWithRetry

func TryToConnectWithRetry(contactPoint string, port int, attempts int, timeout time.Duration) error

Types

type Scylla

type Scylla struct {
	Session      *gocqlx.Session
	ContactPoint string
	Keyspace     string
}

func NewScyllaDbWithPool

func NewScyllaDbWithPool(contactPoint string, port int, keyspace string, poolSize int) (*Scylla, error)

func NewScyllaKeySpaceConnection

func NewScyllaKeySpaceConnection(contactPoint string, port int, keyspace string) (*Scylla, error)

func (*Scylla) CheckIfTableExits

func (s *Scylla) CheckIfTableExits(tableName string) bool

func (*Scylla) Close

func (s *Scylla) Close()

func (*Scylla) CreateTable

func (s *Scylla) CreateTable(tablename, schema string) error

func (*Scylla) CreateTablePath

func (s *Scylla) CreateTablePath(tableName string, prefix string) string

func (*Scylla) Delete

func (s *Scylla) Delete(metaTable *table.Table, model interface{}) error

func (*Scylla) GetAll

func (s *Scylla) GetAll(metaTable *table.Table) *gocqlx.Queryx

func (*Scylla) GetByKeys

func (s *Scylla) GetByKeys(metaTable *table.Table, model interface{}) *gocqlx.Queryx

func (*Scylla) Insert

func (s *Scylla) Insert(metaTable *table.Table, model interface{}) error

func (*Scylla) NewTable

func (s *Scylla) NewTable(schema table.Metadata) *table.Table

func (*Scylla) Update

func (s *Scylla) Update(metaTable *table.Table, model interface{}, columns ...string) error

Directories

Path Synopsis
keyspaces
testing

Jump to

Keyboard shortcuts

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