gorpcvtgatecommon

package
v2.0.0-beta.1+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package gorpcvtgatecommon contains common data structures for go rpc vtgate client and server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundKeyspaceIdQueriesToProto

func BoundKeyspaceIdQueriesToProto(bsq []BoundKeyspaceIdQuery) ([]*vtgatepb.BoundKeyspaceIdQuery, error)

BoundKeyspaceIdQueriesToProto transforms a list of BoundKeyspaceIdQuery to proto3

func BoundShardQueriesToProto

func BoundShardQueriesToProto(bsq []BoundShardQuery) ([]*vtgatepb.BoundShardQuery, error)

BoundShardQueriesToProto transforms a list of BoundShardQuery to proto3

func EntityIdsToProto

func EntityIdsToProto(l []EntityId) []*vtgatepb.ExecuteEntityIdsRequest_EntityId

EntityIdsToProto converts an array of EntityId to proto3

Types

type BatchQueryShard

type BatchQueryShard struct {
	CallerID      *gorpccallerid.CallerID
	Queries       []BoundShardQuery
	TabletType    topodatapb.TabletType
	AsTransaction bool
	Session       *vtgatepb.Session
}

BatchQueryShard represents a batch query request for the specified shards.

type BeginRequest

type BeginRequest struct {
	CallerID *gorpccallerid.CallerID
}

BeginRequest is the BSON implementation of the proto3 query.BeginRequest

type BeginResponse

type BeginResponse struct {
	// Err is named 'Err' instead of 'Error' (as the proto3 version is) to remain
	// consistent with other BSON structs.
	Err     *mproto.RPCError
	Session *vtgatepb.Session
}

BeginResponse is the BSON implementation of the proto3 vtgate.BeginResponse

type BoundKeyspaceIdQuery

type BoundKeyspaceIdQuery struct {
	Sql           string
	BindVariables map[string]interface{}
	Keyspace      string
	KeyspaceIds   [][]byte
}

BoundKeyspaceIdQuery represents a single query request for the specified list of keyspace ids. This is used in a list for KeyspaceIdBatchQuery.

func ProtoToBoundKeyspaceIdQueries

func ProtoToBoundKeyspaceIdQueries(bsq []*vtgatepb.BoundKeyspaceIdQuery) ([]BoundKeyspaceIdQuery, error)

ProtoToBoundKeyspaceIdQueries transforms a list of BoundKeyspaceIdQuery from proto3

type BoundShardQuery

type BoundShardQuery struct {
	Sql           string
	BindVariables map[string]interface{}
	Keyspace      string
	Shards        []string
}

BoundShardQuery represents a single query request for the specified list of shards. This is used in a list for BatchQueryShard.

func ProtoToBoundShardQueries

func ProtoToBoundShardQueries(bsq []*vtgatepb.BoundShardQuery) ([]BoundShardQuery, error)

ProtoToBoundShardQueries transforms a list of BoundShardQuery from proto3

type CommitRequest

type CommitRequest struct {
	CallerID *gorpccallerid.CallerID
	Session  *vtgatepb.Session
}

CommitRequest is the BSON implementation of the proto3 vtgate.CommitRequest

type CommitResponse

type CommitResponse struct {
	// Err is named 'Err' instead of 'Error' (as the proto3 version is) to remain
	// consistent with other BSON structs.
	Err *mproto.RPCError
}

CommitResponse is the BSON implementation of the proto3 vtgate.CommitResponse

type EntityId

type EntityId struct {
	ExternalID interface{}
	KeyspaceID []byte
}

EntityId represents a tuple of external_id and keyspace_id

func ProtoToEntityIds

func ProtoToEntityIds(l []*vtgatepb.ExecuteEntityIdsRequest_EntityId) []EntityId

ProtoToEntityIds converts an array of EntityId from proto3

type EntityIdsQuery

type EntityIdsQuery struct {
	CallerID          *gorpccallerid.CallerID
	Sql               string
	BindVariables     map[string]interface{}
	Keyspace          string
	EntityColumnName  string
	EntityKeyspaceIDs []EntityId
	TabletType        topodatapb.TabletType
	Session           *vtgatepb.Session
	NotInTransaction  bool
}

EntityIdsQuery represents a query request for the specified KeyspaceId map.

type GetSrvKeyspaceRequest

type GetSrvKeyspaceRequest struct {
	Keyspace string
}

GetSrvKeyspaceRequest is the payload to GetSrvRequest

type KeyRangeQuery

type KeyRangeQuery struct {
	CallerID         *gorpccallerid.CallerID
	Sql              string
	BindVariables    map[string]interface{}
	Keyspace         string
	KeyRanges        []*topodatapb.KeyRange
	TabletType       topodatapb.TabletType
	Session          *vtgatepb.Session
	NotInTransaction bool
}

KeyRangeQuery represents a query request for the specified list of keyranges.

type KeyspaceIdBatchQuery

type KeyspaceIdBatchQuery struct {
	CallerID      *gorpccallerid.CallerID
	Queries       []BoundKeyspaceIdQuery
	TabletType    topodatapb.TabletType
	AsTransaction bool
	Session       *vtgatepb.Session
}

KeyspaceIdBatchQuery represents a batch query request for the specified keyspace IDs.

type KeyspaceIdQuery

type KeyspaceIdQuery struct {
	CallerID         *gorpccallerid.CallerID
	Sql              string
	BindVariables    map[string]interface{}
	Keyspace         string
	KeyspaceIds      [][]byte
	TabletType       topodatapb.TabletType
	Session          *vtgatepb.Session
	NotInTransaction bool
}

KeyspaceIdQuery represents a query request for the specified list of keyspace IDs.

type Query

type Query struct {
	CallerID         *gorpccallerid.CallerID
	Sql              string
	BindVariables    map[string]interface{}
	TabletType       topodatapb.TabletType
	Session          *vtgatepb.Session
	NotInTransaction bool
}

Query represents a keyspace agnostic query request.

type QueryResult

type QueryResult struct {
	Result  *sqltypes.Result
	Session *vtgatepb.Session
	Err     *mproto.RPCError
}

QueryResult is sqltypes.Result+Session (for now).

type QueryResultList

type QueryResultList struct {
	List    []sqltypes.Result
	Session *vtgatepb.Session
	Err     *mproto.RPCError
}

QueryResultList is sqltypes.ResultList+Session

type QueryShard

type QueryShard struct {
	CallerID         *gorpccallerid.CallerID
	Sql              string
	BindVariables    map[string]interface{}
	Keyspace         string
	Shards           []string
	TabletType       topodatapb.TabletType
	Session          *vtgatepb.Session
	NotInTransaction bool
}

QueryShard represents a query request for the specified list of shards.

type RollbackRequest

type RollbackRequest struct {
	CallerID *gorpccallerid.CallerID
	Session  *vtgatepb.Session
}

RollbackRequest is the BSON implementation of the proto3 vtgate.RollbackRequest

type RollbackResponse

type RollbackResponse struct {
	// Err is named 'Err' instead of 'Error' (as the proto3 version is) to remain
	// consistent with other BSON structs.
	Err *mproto.RPCError
}

RollbackResponse is the BSON implementation of the proto3 vtgate.RollbackResponse

type SplitQueryRequest

type SplitQueryRequest struct {
	CallerID    *gorpccallerid.CallerID
	Keyspace    string
	Query       querytypes.BoundQuery
	SplitColumn string
	SplitCount  int64
}

SplitQueryRequest is a request to split a query into multiple parts

type SplitQueryResult

type SplitQueryResult struct {
	Splits []*vtgatepb.SplitQueryResponse_Part
	Err    *mproto.RPCError
}

SplitQueryResult is the response from SplitQueryRequest

Jump to

Keyboard shortcuts

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