cassandra

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 265

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consistency

type Consistency uint16

Consistency is Cassandra's consistency level for queries.

const (
	// Any ...
	Any Consistency = 0x00
	// One ...
	One Consistency = 0x01
	// Two ...
	Two Consistency = 0x02
	// Three ...
	Three Consistency = 0x03
	// Quorum ...
	Quorum Consistency = 0x04
	// All ...
	All Consistency = 0x05
	// LocalQuorum ...
	LocalQuorum Consistency = 0x06
	// EachQuorum ...
	EachQuorum Consistency = 0x07
	// LocalOne ...
	LocalOne Consistency = 0x0A
)

type Iterator

type Iterator interface {
	Scan(dest ...any) bool
	Close() error
}

Iterator is an abstraction of gocql.Iter

type Query

type Query interface {
	UpdateQuery
	Iter() Iterator
	Bind(v ...any) Query
	Consistency(level Consistency) Query
	PageSize(int) Query
}

Query is an abstraction of gocql.Query

type Session

type Session interface {
	Query(stmt string, values ...any) Query
	Close()
}

Session is an abstraction of gocql.Session

type UpdateQuery

type UpdateQuery interface {
	Exec() error
	String() string

	// ScanCAS executes a lightweight transaction (i.e. an UPDATE or INSERT
	// statement containing an IF clause). If the transaction fails because
	// the existing values did not match, the previous values will be stored
	// in dest.
	ScanCAS(dest ...any) (bool, error)
}

UpdateQuery is a subset of Query just for updates

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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