client2

package
v0.0.0-...-7c5168d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2013 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2012, Google Inc. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

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 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, user, password string) (*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
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.
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