voltdb

package
v0.0.0-...-b9c4364 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2016 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn is a single connection to a single node of a VoltDB database

func NewConnection

func NewConnection(user string, passwd string, hostAndPort string) (*Conn, error)

NewConn creates an initialized, authenticated Conn.

func (*Conn) Call

func (conn *Conn) Call(procedure string, params ...interface{}) (*Response, error)

Call invokes the procedure 'procedure' with parameter values 'params' and returns a pointer to the received Response.

func (*Conn) Close

func (conn *Conn) Close() error

Close a connection if open. A Conn, once closed, has no further use. To open a new connection, use NewConnection.

func (*Conn) GoString

func (conn *Conn) GoString() string

GoString provides a default printable format for Conn.

func (*Conn) TestConnection

func (conn *Conn) TestConnection() bool

Ping the database for liveness.

type Response

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

Response is a stored procedure result.

func (*Response) AppStatus

func (rsp *Response) AppStatus() int

func (*Response) AppStatusString

func (rsp *Response) AppStatusString() string

func (*Response) ClusterLatency

func (rsp *Response) ClusterLatency() int

func (*Response) GoString

func (rsp *Response) GoString() string

func (*Response) ResultSets

func (rsp *Response) ResultSets() []Table

func (*Response) Status

func (rsp *Response) Status() Status

func (*Response) StatusString

func (rsp *Response) StatusString() string

func (*Response) Table

func (rsp *Response) Table(offset int) *Table

type Status

type Status int

Response status codes

const (
	SUCCESS            Status = 1
	USER_ABORT         Status = -1
	GRACEFUL_FAILURE   Status = -2
	UNEXPECTED_FAILURE Status = -3
	CONNECTION_LOST    Status = -4
)

func (Status) String

func (s Status) String() string

type Table

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

Table represents a single result set for a stored procedure invocation.

func (*Table) ColumnCount

func (table *Table) ColumnCount() int

func (*Table) ColumnNames

func (table *Table) ColumnNames() []string

func (*Table) ColumnTypes

func (table *Table) ColumnTypes() []int8

func (*Table) GoString

func (table *Table) GoString() string

func (*Table) HasNext

func (table *Table) HasNext() bool

HasNext returns true of there are additional rows to read.

func (*Table) Next

func (table *Table) Next(v interface{}) error

Next populates v (*struct) with the values of the next row.

func (*Table) RowCount

func (table *Table) RowCount() int

Rowcount returns the number of rows returned by the server for this table.

func (*Table) StatusCode

func (table *Table) StatusCode() int

Jump to

Keyboard shortcuts

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