proto

package
v0.0.0-...-4754828 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2014 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulateQueryResult

func PopulateQueryResult(in *mproto.QueryResult, out *QueryResult)

PopulateQueryResult populates a QueryResult from a mysql/proto.QueryResult

Types

type BatchQueryShard

type BatchQueryShard struct {
	Queries    []tproto.BoundQuery
	Keyspace   string
	Shards     []string
	TabletType topo.TabletType
	Session    *Session
}

BatchQueryShard represents a batch query request for the specified shards.

func (*BatchQueryShard) MarshalBson

func (batchQueryShard *BatchQueryShard) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes BatchQueryShard.

func (*BatchQueryShard) UnmarshalBson

func (batchQueryShard *BatchQueryShard) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into BatchQueryShard.

type EntityIdsQuery

type EntityIdsQuery struct {
	Sql                 string
	BindVariables       map[string]interface{}
	Keyspace            string
	EntityColumnName    string
	EntityKeyspaceIdMap map[string]kproto.KeyspaceId
	TabletType          topo.TabletType
	Session             *Session
}

EntityIdsQuery represents a query request for the specified KeyspaceId map.

func (*EntityIdsQuery) MarshalBson

func (entityIdsQuery *EntityIdsQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes EntityIdsQuery.

func (*EntityIdsQuery) UnmarshalBson

func (entityIdsQuery *EntityIdsQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into EntityIdsQuery.

type KeyRangeQuery

type KeyRangeQuery struct {
	Sql           string
	BindVariables map[string]interface{}
	Keyspace      string
	KeyRanges     []kproto.KeyRange
	TabletType    topo.TabletType
	Session       *Session
}

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

func (*KeyRangeQuery) MarshalBson

func (keyRangeQuery *KeyRangeQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes KeyRangeQuery.

func (*KeyRangeQuery) UnmarshalBson

func (keyRangeQuery *KeyRangeQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into KeyRangeQuery.

type KeyspaceIdBatchQuery

type KeyspaceIdBatchQuery struct {
	Queries     []tproto.BoundQuery
	Keyspace    string
	KeyspaceIds []kproto.KeyspaceId
	TabletType  topo.TabletType
	Session     *Session
}

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

func (*KeyspaceIdBatchQuery) MarshalBson

func (keyspaceIdBatchQuery *KeyspaceIdBatchQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes KeyspaceIdBatchQuery.

func (*KeyspaceIdBatchQuery) UnmarshalBson

func (keyspaceIdBatchQuery *KeyspaceIdBatchQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into KeyspaceIdBatchQuery.

type KeyspaceIdQuery

type KeyspaceIdQuery struct {
	Sql           string
	BindVariables map[string]interface{}
	Keyspace      string
	KeyspaceIds   []kproto.KeyspaceId
	TabletType    topo.TabletType
	Session       *Session
}

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

func (*KeyspaceIdQuery) MarshalBson

func (keyspaceIdQuery *KeyspaceIdQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes KeyspaceIdQuery.

func (*KeyspaceIdQuery) UnmarshalBson

func (keyspaceIdQuery *KeyspaceIdQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into KeyspaceIdQuery.

type QueryResult

type QueryResult struct {
	Fields       []mproto.Field
	RowsAffected uint64
	InsertId     uint64
	Rows         [][]sqltypes.Value
	Session      *Session
	Error        string
}

QueryResult is mproto.QueryResult+Session (for now).

func (*QueryResult) MarshalBson

func (queryResult *QueryResult) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes QueryResult.

func (*QueryResult) UnmarshalBson

func (queryResult *QueryResult) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into QueryResult.

type QueryResultList

type QueryResultList struct {
	List    []mproto.QueryResult
	Session *Session
	Error   string
}

QueryResultList is mproto.QueryResultList+Session

type QueryShard

type QueryShard struct {
	Sql           string
	BindVariables map[string]interface{}
	Keyspace      string
	Shards        []string
	TabletType    topo.TabletType
	Session       *Session
}

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

func (*QueryShard) MarshalBson

func (queryShard *QueryShard) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes QueryShard.

func (*QueryShard) UnmarshalBson

func (queryShard *QueryShard) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into QueryShard.

type Session

type Session struct {
	InTransaction bool
	ShardSessions []*ShardSession
}

Session represents the session state. It keeps track of the shards on which transactions are in progress, along with the corresponding tranaction ids.

func (*Session) MarshalBson

func (session *Session) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes Session.

func (*Session) String

func (session *Session) String() string

func (*Session) UnmarshalBson

func (session *Session) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into Session.

type ShardSession

type ShardSession struct {
	Keyspace      string
	Shard         string
	TabletType    topo.TabletType
	TransactionId int64
}

ShardSession represents the session state for a shard.

func (*ShardSession) MarshalBson

func (shardSession *ShardSession) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson bson-encodes ShardSession.

func (*ShardSession) String

func (shardSession *ShardSession) String() string

func (*ShardSession) UnmarshalBson

func (shardSession *ShardSession) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson bson-decodes into ShardSession.

Jump to

Keyboard shortcuts

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