client2

package
v0.0.0-...-444a4ab Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2015 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EID_NODE = iota
	VALUE_NODE
	LIST_NODE
	OTHER_NODE
)

Variables

View Source
var (
	ErrNotConnected = fmt.Errorf("vt: not connected")
)

Functions

func GetShardList

func GetShardList(sql string, bindVariables map[string]interface{}, tabletKeys []key.KeyspaceId) (shardlist []int, err error)

func RegisterShardedDrivers

func RegisterShardedDrivers()

Types

type MetaTx

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

A "transaction" that may be across and thus, not transactional at this point.

func (*MetaTx) Commit

func (tx *MetaTx) Commit() (err error)

func (*MetaTx) Rollback

func (tx *MetaTx) Rollback() error

type RoutingPlan

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

type ShardedConn

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

Not thread safe, as per sql package.

func Dial

func Dial(ts topo.Server, cell, keyspace string, tabletType topo.TabletType, stream bool, timeout time.Duration) (*ShardedConn, error)

FIXME(msolomon) Normally a connect method would actually connect up to the appropriate endpoints. In the distributed case, it's unclear that this is necessary. You have to deal with transient failures anyway, so the whole system degenerates to managing connections on demand.

func (*ShardedConn) Begin

func (sc *ShardedConn) Begin() (db.Tx, error)

func (*ShardedConn) Close

func (sc *ShardedConn) Close() error

func (*ShardedConn) Exec

func (sc *ShardedConn) Exec(query string, bindVars map[string]interface{}) (db.Result, error)

func (*ShardedConn) ExecWithKey

func (sc *ShardedConn) ExecWithKey(query string, bindVars map[string]interface{}, keyVal interface{}) (db.Result, error)

FIXME(msolomon) define key interface "Keyer" or force a concrete type?

type VtClientError

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

func (VtClientError) Error

func (err VtClientError) Error() string

func (VtClientError) Partial

func (err VtClientError) Partial() bool

Directories

Path Synopsis
Package tablet is an API compliant to the requirements of database/sql Open expects name to be "hostname:port/keyspace/shard" For query arguments, we assume place-holders in the query string in the form of :v0, :v1, etc.
Package tablet is an API compliant to the requirements of database/sql Open expects name to be "hostname:port/keyspace/shard" For query arguments, we assume place-holders in the query string in the form of :v0, :v1, etc.

Jump to

Keyboard shortcuts

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