cassandra

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2017 License: MIT Imports: 0 Imported by: 0

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 ...interface{}) bool
	Close() error
}

Iterator is an abstraction of gocql.Iter

type Query

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

Query is an abstraction of gocql.Query

type Session

type Session interface {
	Query(stmt string, values ...interface{}) 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 ...interface{}) (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