cassandra

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Backend   = types.BackendCassandra
	BatchSize = 1000
)
View Source
const PUSH_QUERY = `
INSERT INTO {{ .TableName }} ( {{ .Fields }} )
VALUES ( {{ .InsertPlaceholders }} )
`

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*gocql.Session
}

func Open

func Open(option *types.CassandraOpt) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) CreateTable added in v0.1.0

func (db *DB) CreateTable(ctx context.Context, opt online.CreateTableOpt) error

func (*DB) Get

func (db *DB) Get(ctx context.Context, opt online.GetOpt) (dbutil.RowMap, error)

func (*DB) Import

func (db *DB) Import(ctx context.Context, opt online.ImportOpt) error

func (*DB) MultiGet

func (db *DB) MultiGet(ctx context.Context, opt online.MultiGetOpt) (map[string]dbutil.RowMap, error)

response: map[entity_key]map[feature_name]feature_value

func (*DB) Ping

func (db *DB) Ping(ctx context.Context) error

func (*DB) Purge

func (db *DB) Purge(ctx context.Context, revisionID int) error

func (*DB) Push

func (db *DB) Push(ctx context.Context, opt online.PushOpt) error

Jump to

Keyboard shortcuts

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