go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/vtgate/fakerpcvtgateconn Index | Files

package fakerpcvtgateconn

import "gopkg.in/src-d/go-vitess.v1/vt/vtgate/fakerpcvtgateconn"

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

Index

Package Files

conn.go

type FakeVTGateConn Uses

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

FakeVTGateConn provides a fake implementation of vtgateconn.Impl

func RegisterFakeVTGateConnDialer Uses

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 Uses

func (conn *FakeVTGateConn) AddQuery(
    sql string,
    bindVariables map[string]*querypb.BindVariable,
    session *vtgatepb.Session,
    expectedResult *sqltypes.Result)

AddQuery adds a query and expected result.

func (*FakeVTGateConn) AddShardQuery Uses

func (conn *FakeVTGateConn) AddShardQuery(
    sql string,
    bindVariables map[string]*querypb.BindVariable,
    keyspace string,
    shards []string,
    tabletType topodatapb.TabletType,
    session *vtgatepb.Session,
    notInTransaction bool,
    expectedResult *sqltypes.Result)

AddShardQuery adds a shard query and expected result.

func (*FakeVTGateConn) AddSplitQuery Uses

func (conn *FakeVTGateConn) AddSplitQuery(
    keyspace string,
    sql string,
    bindVariables map[string]*querypb.BindVariable,
    splitColumns []string,
    splitCount int64,
    numRowsPerQueryPart int64,
    algorithm querypb.SplitQueryRequest_Algorithm,
    expectedResult []*vtgatepb.SplitQueryResponse_Part)

AddSplitQuery adds a split query and expected result.

func (*FakeVTGateConn) Begin Uses

func (conn *FakeVTGateConn) Begin(ctx context.Context, singledb bool) (*vtgatepb.Session, error)

Begin please see vtgateconn.Impl.Begin

func (*FakeVTGateConn) Close Uses

func (conn *FakeVTGateConn) Close()

Close please see vtgateconn.Impl.Close

func (*FakeVTGateConn) Commit Uses

func (conn *FakeVTGateConn) Commit(ctx context.Context, session *vtgatepb.Session, twopc bool) error

Commit please see vtgateconn.Impl.Commit

func (*FakeVTGateConn) Execute Uses

func (conn *FakeVTGateConn) Execute(ctx context.Context, session *vtgatepb.Session, sql string, bindVars map[string]*querypb.BindVariable) (*vtgatepb.Session, *sqltypes.Result, error)

Execute please see vtgateconn.Impl.Execute

func (*FakeVTGateConn) ExecuteBatch Uses

func (conn *FakeVTGateConn) ExecuteBatch(ctx context.Context, session *vtgatepb.Session, sqlList []string, bindVarsList []map[string]*querypb.BindVariable) (*vtgatepb.Session, []sqltypes.QueryResponse, error)

ExecuteBatch please see vtgateconn.Impl.ExecuteBatch

func (*FakeVTGateConn) ExecuteBatchKeyspaceIds Uses

func (conn *FakeVTGateConn) ExecuteBatchKeyspaceIds(ctx context.Context, queries []*vtgatepb.BoundKeyspaceIdQuery, tabletType topodatapb.TabletType, asTransaction bool, session *vtgatepb.Session, options *querypb.ExecuteOptions) (*vtgatepb.Session, []sqltypes.Result, error)

ExecuteBatchKeyspaceIds please see vtgateconn.Impl.ExecuteBatchKeyspaceIds

func (*FakeVTGateConn) ExecuteBatchShards Uses

func (conn *FakeVTGateConn) ExecuteBatchShards(ctx context.Context, queries []*vtgatepb.BoundShardQuery, tabletType topodatapb.TabletType, asTransaction bool, session *vtgatepb.Session, options *querypb.ExecuteOptions) (*vtgatepb.Session, []sqltypes.Result, error)

ExecuteBatchShards please see vtgateconn.Impl.ExecuteBatchShards

func (*FakeVTGateConn) ExecuteEntityIds Uses

func (conn *FakeVTGateConn) ExecuteEntityIds(ctx context.Context, query string, keyspace string, entityColumnName string, entityKeyspaceIDs []*vtgatepb.ExecuteEntityIdsRequest_EntityId, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, session *vtgatepb.Session, options *querypb.ExecuteOptions) (*vtgatepb.Session, *sqltypes.Result, error)

ExecuteEntityIds please see vtgateconn.Impl.ExecuteEntityIds

func (*FakeVTGateConn) ExecuteKeyRanges Uses

func (conn *FakeVTGateConn) ExecuteKeyRanges(ctx context.Context, query string, keyspace string, keyRanges []*topodatapb.KeyRange, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, session *vtgatepb.Session, options *querypb.ExecuteOptions) (*vtgatepb.Session, *sqltypes.Result, error)

ExecuteKeyRanges please see vtgateconn.Impl.ExecuteKeyRanges

func (*FakeVTGateConn) ExecuteKeyspaceIds Uses

func (conn *FakeVTGateConn) ExecuteKeyspaceIds(ctx context.Context, query string, keyspace string, keyspaceIds [][]byte, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, session *vtgatepb.Session, options *querypb.ExecuteOptions) (*vtgatepb.Session, *sqltypes.Result, error)

ExecuteKeyspaceIds please see vtgateconn.Impl.ExecuteKeyspaceIds

func (*FakeVTGateConn) ExecuteShards Uses

func (conn *FakeVTGateConn) ExecuteShards(ctx context.Context, sql string, keyspace string, shards []string, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, session *vtgatepb.Session, options *querypb.ExecuteOptions) (*vtgatepb.Session, *sqltypes.Result, error)

ExecuteShards please see vtgateconn.Impl.ExecuteShard

func (*FakeVTGateConn) GetSrvKeyspace Uses

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

GetSrvKeyspace please see vtgateconn.Impl.GetSrvKeyspace

func (*FakeVTGateConn) MessageAck Uses

func (conn *FakeVTGateConn) MessageAck(ctx context.Context, keyspace string, name string, ids []*querypb.Value) (int64, error)

MessageAck is part of the vtgate service API.

func (*FakeVTGateConn) MessageAckKeyspaceIds Uses

func (conn *FakeVTGateConn) MessageAckKeyspaceIds(ctx context.Context, keyspace string, name string, idKeyspaceIDs []*vtgatepb.IdKeyspaceId) (int64, error)

MessageAckKeyspaceIds is part of the vtgate service API.

func (*FakeVTGateConn) MessageStream Uses

func (conn *FakeVTGateConn) MessageStream(ctx context.Context, keyspace string, shard string, keyRange *topodatapb.KeyRange, name string, callback func(*sqltypes.Result) error) error

MessageStream is part of the vtgate service API.

func (*FakeVTGateConn) ResolveTransaction Uses

func (conn *FakeVTGateConn) ResolveTransaction(ctx context.Context, dtid string) error

ResolveTransaction please see vtgateconn.Impl.ResolveTransaction

func (*FakeVTGateConn) Rollback Uses

func (conn *FakeVTGateConn) Rollback(ctx context.Context, session *vtgatepb.Session) error

Rollback please see vtgateconn.Impl.Rollback

func (*FakeVTGateConn) SplitQuery Uses

func (conn *FakeVTGateConn) SplitQuery(
    ctx context.Context,
    keyspace string,
    query string,
    bindVars map[string]*querypb.BindVariable,
    splitColumns []string,
    splitCount int64,
    numRowsPerQueryPart int64,
    algorithm querypb.SplitQueryRequest_Algorithm) ([]*vtgatepb.SplitQueryResponse_Part, error)

SplitQuery please see vtgateconn.Impl.SplitQuery

func (*FakeVTGateConn) StreamExecute Uses

func (conn *FakeVTGateConn) StreamExecute(ctx context.Context, session *vtgatepb.Session, sql string, bindVars map[string]*querypb.BindVariable) (sqltypes.ResultStream, error)

StreamExecute please see vtgateconn.Impl.StreamExecute

func (*FakeVTGateConn) StreamExecuteKeyRanges Uses

func (conn *FakeVTGateConn) StreamExecuteKeyRanges(ctx context.Context, query string, keyspace string, keyRanges []*topodatapb.KeyRange, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, options *querypb.ExecuteOptions) (sqltypes.ResultStream, error)

StreamExecuteKeyRanges please see vtgateconn.Impl.StreamExecuteKeyRanges

func (*FakeVTGateConn) StreamExecuteKeyspaceIds Uses

func (conn *FakeVTGateConn) StreamExecuteKeyspaceIds(ctx context.Context, query string, keyspace string, keyspaceIds [][]byte, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, options *querypb.ExecuteOptions) (sqltypes.ResultStream, error)

StreamExecuteKeyspaceIds please see vtgateconn.Impl.StreamExecuteKeyspaceIds

func (*FakeVTGateConn) StreamExecuteShards Uses

func (conn *FakeVTGateConn) StreamExecuteShards(ctx context.Context, query string, keyspace string, shards []string, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, options *querypb.ExecuteOptions) (sqltypes.ResultStream, error)

StreamExecuteShards please see vtgateconn.Impl.StreamExecuteShards

func (*FakeVTGateConn) UpdateStream Uses

func (conn *FakeVTGateConn) UpdateStream(ctx context.Context, keyspace string, shard string, keyRange *topodatapb.KeyRange, tabletType topodatapb.TabletType, timestamp int64, event *querypb.EventToken) (vtgateconn.UpdateStreamReader, error)

UpdateStream please see vtgateconn.Impl.UpdateStream

Package fakerpcvtgateconn imports 13 packages (graph) and is imported by 1 packages. Updated 2019-06-13. Refresh now. Tools for package owners.