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 ¶
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.
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) Close ¶
func (sc *ShardedConn) Close() 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. |
Click to show internal directories.
Click to hide internal directories.