cassandra

package
v0.0.0-...-60f0674 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2015 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CASS_VALUE_TYPE_UNKNOWN   = 0xFFFF
	CASS_VALUE_TYPE_CUSTOM    = 0x0000
	CASS_VALUE_TYPE_ASCII     = 0x0001
	CASS_VALUE_TYPE_BIGINT    = 0x0002
	CASS_VALUE_TYPE_BLOB      = 0x0003
	CASS_VALUE_TYPE_BOOLEAN   = 0x0004
	CASS_VALUE_TYPE_COUNTER   = 0x0005
	CASS_VALUE_TYPE_DECIMAL   = 0x0006
	CASS_VALUE_TYPE_DOUBLE    = 0x0007
	CASS_VALUE_TYPE_FLOAT     = 0x0008
	CASS_VALUE_TYPE_INT       = 0x0009
	CASS_VALUE_TYPE_TEXT      = 0x000A
	CASS_VALUE_TYPE_TIMESTAMP = 0x000B
	CASS_VALUE_TYPE_UUID      = 0x000C
	CASS_VALUE_TYPE_VARCHAR   = 0x000D
	CASS_VALUE_TYPE_VARINT    = 0x000E
	CASS_VALUE_TYPE_TIMEUUID  = 0x000F
	CASS_VALUE_TYPE_INET      = 0x0010
	CASS_VALUE_TYPE_LIST      = 0x0020
	CASS_VALUE_TYPE_MAP       = 0x0021
	CASS_VALUE_TYPE_SET       = 0x0022
)

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrUnavailable   = errors.New("unavailable")
	ErrUnsupported   = errors.New("feature not supported")
	ErrTooManyStmts  = errors.New("too many statements")
	ErrSessionClosed = errors.New("session has been closed")
	ErrNoConnections = errors.New("no connections available")
	ErrNoKeyspace    = errors.New("no keyspace provided")
	ErrNoMetadata    = errors.New("no metadata available")
)

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}

func NewCluster

func NewCluster() *Cluster

func (*Cluster) Finalize

func (cluster *Cluster) Finalize()

func (*Cluster) SessionConnect

func (cluster *Cluster) SessionConnect(session *Session) *Future

func (*Cluster) SetContactPoints

func (cluster *Cluster) SetContactPoints(contactPoints string)

func (*Cluster) SetPort

func (cluster *Cluster) SetPort(port int64)

type Consistency

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

func (Consistency) String

func (c Consistency) String() string

type Future

type Future struct {
	// contains filtered or unexported fields
}

func (*Future) Finalize

func (future *Future) Finalize()

func (*Future) Prepared

func (future *Future) Prepared() *Prepared

func (*Future) Ready

func (future *Future) Ready() bool

func (*Future) Result

func (future *Future) Result() *Result

func (*Future) Wait

func (future *Future) Wait()

func (*Future) WaitTimed

func (future *Future) WaitTimed(timeout uint64) bool

type Iter

type Iter struct {
	// contains filtered or unexported fields
}

Iter represents an iterator that can be used to iterate over all rows that were returned by a query. The iterator might send additional queries to the database during the iteration if paging was enabled.

func (*Iter) Close

func (i *Iter) Close() error

func (*Iter) Scan

func (i *Iter) Scan(dest ...interface{}) bool

type Prepared

type Prepared struct {
	// contains filtered or unexported fields
}

func (*Prepared) Bind

func (prepared *Prepared) Bind() *Statement

func (*Prepared) Finalize

func (prepared *Prepared) Finalize()

type Query

type Query struct {
	// contains filtered or unexported fields
}

func (*Query) Consistency

func (q *Query) Consistency(c Consistency) *Query

func (*Query) Iter

func (q *Query) Iter() *Iter

Iter executes the query and returns an iterator capable of iterating over all results.

type Result

type Result struct {
	// contains filtered or unexported fields
}

func (*Result) ColumnCount

func (result *Result) ColumnCount() uint64

func (*Result) ColumnName

func (result *Result) ColumnName(index uint64) string

func (*Result) ColumnType

func (result *Result) ColumnType(index uint64) int

func (*Result) Finalize

func (result *Result) Finalize()

func (*Result) HasMorePages

func (result *Result) HasMorePages() bool

func (*Result) Next

func (result *Result) Next() bool

func (*Result) RowCount

func (result *Result) RowCount() uint64

func (*Result) Scan

func (result *Result) Scan(args ...interface{}) error

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession() *Session

func (*Session) Execute

func (session *Session) Execute(statement *Statement) *Future

func (*Session) Finalize

func (session *Session) Finalize()

func (*Session) Query

func (s *Session) Query(stmt string, values ...interface{}) *Query

type Statement

type Statement struct {
	// contains filtered or unexported fields
}

func NewStatement

func NewStatement(query string, param_count int) *Statement

func (*Statement) Bind

func (statement *Statement) Bind(args ...interface{}) error

func (*Statement) Finalize

func (statement *Statement) Finalize()

type Uuid

type Uuid struct {
	// contains filtered or unexported fields
}

func (Uuid) String

func (u Uuid) String() string

type UuidGenerator

type UuidGenerator struct {
	// contains filtered or unexported fields
}

func NewUuidGenerator

func NewUuidGenerator() *UuidGenerator

func NewUuidGeneratorWithNode

func NewUuidGeneratorWithNode(node uint64) *UuidGenerator

func (*UuidGenerator) Finalize

func (generator *UuidGenerator) Finalize()

func (*UuidGenerator) NewUuidFromTime

func (generator *UuidGenerator) NewUuidFromTime(timestamp uint64) *Uuid

func (*UuidGenerator) NewUuidGenRandom

func (generator *UuidGenerator) NewUuidGenRandom() *Uuid

func (*UuidGenerator) NewUuidGenTime

func (generator *UuidGenerator) NewUuidGenTime() *Uuid

Jump to

Keyboard shortcuts

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