fakerpcvtgateconn

package
v2.0.0-alpha5+incompat... Latest Latest
Warning

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

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

Documentation

Overview

Package fakerpcvtgateconn provides a fake implementation of vtgateconn.Impl that doesn't do any RPC, but uses a local map to return results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeVTGateConn

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

FakeVTGateConn provides a fake implementation of vtgateconn.Impl

func RegisterFakeVTGateConnDialer

func RegisterFakeVTGateConnDialer() (*FakeVTGateConn, string)

RegisterFakeVTGateConnDialer registers the proper dialer for this fake, and returns the underlying instance that will be returned by the dialer, and the protocol to use to get this fake.

func (*FakeVTGateConn) AddQuery

func (conn *FakeVTGateConn) AddQuery(
	sql string,
	bindVariables map[string]interface{},
	tabletType pb.TabletType,
	session *proto.Session,
	notInTransaction bool,
	expectedResult *mproto.QueryResult)

AddQuery adds a query and expected result.

func (*FakeVTGateConn) AddShardQuery

func (conn *FakeVTGateConn) AddShardQuery(
	sql string,
	bindVariables map[string]interface{},
	keyspace string,
	shards []string,
	tabletType pb.TabletType,
	session *proto.Session,
	notInTransaction bool,
	expectedResult *mproto.QueryResult)

AddShardQuery adds a shard query and expected result.

func (*FakeVTGateConn) AddSplitQuery

func (conn *FakeVTGateConn) AddSplitQuery(
	keyspace string,
	sql string,
	bindVariables map[string]interface{},
	splitColumn string,
	splitCount int,
	expectedResult []*pbg.SplitQueryResponse_Part)

AddSplitQuery adds a split query and expected result.

func (*FakeVTGateConn) Begin

func (conn *FakeVTGateConn) Begin(ctx context.Context) (interface{}, error)

Begin please see vtgateconn.Impl.Begin

func (*FakeVTGateConn) Begin2

func (conn *FakeVTGateConn) Begin2(ctx context.Context) (interface{}, error)

Begin2 please see vtgateconn.Impl.Begin2

func (*FakeVTGateConn) Close

func (conn *FakeVTGateConn) Close()

Close please see vtgateconn.Impl.Close

func (*FakeVTGateConn) Commit

func (conn *FakeVTGateConn) Commit(ctx context.Context, session interface{}) error

Commit please see vtgateconn.Impl.Commit

func (*FakeVTGateConn) Commit2

func (conn *FakeVTGateConn) Commit2(ctx context.Context, session interface{}) error

Commit2 please see vtgateconn.Impl.Commit2

func (*FakeVTGateConn) Execute

func (conn *FakeVTGateConn) Execute(ctx context.Context, sql string, bindVars map[string]interface{}, tabletType pb.TabletType, notInTransaction bool, session interface{}) (*mproto.QueryResult, interface{}, error)

Execute please see vtgateconn.Impl.Execute

func (*FakeVTGateConn) ExecuteBatchKeyspaceIds

func (conn *FakeVTGateConn) ExecuteBatchKeyspaceIds(ctx context.Context, queries []proto.BoundKeyspaceIdQuery, tabletType pb.TabletType, asTransaction bool, session interface{}) ([]mproto.QueryResult, interface{}, error)

ExecuteBatchKeyspaceIds please see vtgateconn.Impl.ExecuteBatchKeyspaceIds

func (*FakeVTGateConn) ExecuteBatchShards

func (conn *FakeVTGateConn) ExecuteBatchShards(ctx context.Context, queries []proto.BoundShardQuery, tabletType pb.TabletType, asTransaction bool, session interface{}) ([]mproto.QueryResult, interface{}, error)

ExecuteBatchShards please see vtgateconn.Impl.ExecuteBatchShards

func (*FakeVTGateConn) ExecuteEntityIds

func (conn *FakeVTGateConn) ExecuteEntityIds(ctx context.Context, query string, keyspace string, entityColumnName string, entityKeyspaceIDs []*pbg.ExecuteEntityIdsRequest_EntityId, bindVars map[string]interface{}, tabletType pb.TabletType, notInTransaction bool, session interface{}) (*mproto.QueryResult, interface{}, error)

ExecuteEntityIds please see vtgateconn.Impl.ExecuteEntityIds

func (*FakeVTGateConn) ExecuteKeyRanges

func (conn *FakeVTGateConn) ExecuteKeyRanges(ctx context.Context, query string, keyspace string, keyRanges []*pb.KeyRange, bindVars map[string]interface{}, tabletType pb.TabletType, notInTransaction bool, session interface{}) (*mproto.QueryResult, interface{}, error)

ExecuteKeyRanges please see vtgateconn.Impl.ExecuteKeyRanges

func (*FakeVTGateConn) ExecuteKeyspaceIds

func (conn *FakeVTGateConn) ExecuteKeyspaceIds(ctx context.Context, query string, keyspace string, keyspaceIds [][]byte, bindVars map[string]interface{}, tabletType pb.TabletType, notInTransaction bool, session interface{}) (*mproto.QueryResult, interface{}, error)

ExecuteKeyspaceIds please see vtgateconn.Impl.ExecuteKeyspaceIds

func (*FakeVTGateConn) ExecuteShards

func (conn *FakeVTGateConn) ExecuteShards(ctx context.Context, sql string, keyspace string, shards []string, bindVars map[string]interface{}, tabletType pb.TabletType, notInTransaction bool, session interface{}) (*mproto.QueryResult, interface{}, error)

ExecuteShards please see vtgateconn.Impl.ExecuteShard

func (*FakeVTGateConn) GetSrvKeyspace

func (conn *FakeVTGateConn) GetSrvKeyspace(ctx context.Context, keyspace string) (*pb.SrvKeyspace, error)

GetSrvKeyspace please see vtgateconn.Impl.SplitQuery

func (*FakeVTGateConn) Rollback

func (conn *FakeVTGateConn) Rollback(ctx context.Context, session interface{}) error

Rollback please see vtgateconn.Impl.Rollback

func (*FakeVTGateConn) Rollback2

func (conn *FakeVTGateConn) Rollback2(ctx context.Context, session interface{}) error

Rollback2 please see vtgateconn.Impl.Rollback2

func (*FakeVTGateConn) SplitQuery

func (conn *FakeVTGateConn) SplitQuery(ctx context.Context, keyspace string, query string, bindVars map[string]interface{}, splitColumn string, splitCount int) ([]*pbg.SplitQueryResponse_Part, error)

SplitQuery please see vtgateconn.Impl.SplitQuery

func (*FakeVTGateConn) StreamExecute

func (conn *FakeVTGateConn) StreamExecute(ctx context.Context, query string, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecute please see vtgateconn.Impl.StreamExecute

func (*FakeVTGateConn) StreamExecute2

func (conn *FakeVTGateConn) StreamExecute2(ctx context.Context, query string, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecute2 please see vtgateconn.Impl.StreamExecute2

func (*FakeVTGateConn) StreamExecuteKeyRanges

func (conn *FakeVTGateConn) StreamExecuteKeyRanges(ctx context.Context, query string, keyspace string, keyRanges []*pb.KeyRange, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecuteKeyRanges please see vtgateconn.Impl.StreamExecuteKeyRanges

func (*FakeVTGateConn) StreamExecuteKeyRanges2

func (conn *FakeVTGateConn) StreamExecuteKeyRanges2(ctx context.Context, query string, keyspace string, keyRanges []*pb.KeyRange, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecuteKeyRanges2 please see vtgateconn.Impl.StreamExecuteKeyRanges2

func (*FakeVTGateConn) StreamExecuteKeyspaceIds

func (conn *FakeVTGateConn) StreamExecuteKeyspaceIds(ctx context.Context, query string, keyspace string, keyspaceIds [][]byte, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecuteKeyspaceIds please see vtgateconn.Impl.StreamExecuteKeyspaceIds

func (*FakeVTGateConn) StreamExecuteKeyspaceIds2

func (conn *FakeVTGateConn) StreamExecuteKeyspaceIds2(ctx context.Context, query string, keyspace string, keyspaceIds [][]byte, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecuteKeyspaceIds2 please see vtgateconn.Impl.StreamExecuteKeyspaceIds2

func (*FakeVTGateConn) StreamExecuteShards

func (conn *FakeVTGateConn) StreamExecuteShards(ctx context.Context, query string, keyspace string, shards []string, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecuteShards please see vtgateconn.Impl.StreamExecuteShards

func (*FakeVTGateConn) StreamExecuteShards2

func (conn *FakeVTGateConn) StreamExecuteShards2(ctx context.Context, query string, keyspace string, shards []string, bindVars map[string]interface{}, tabletType pb.TabletType) (<-chan *mproto.QueryResult, vtgateconn.ErrFunc, error)

StreamExecuteShards2 please see vtgateconn.Impl.StreamExecuteShards2

Jump to

Keyboard shortcuts

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