proto

package
v0.0.0-...-9a5932e Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2014 License: BSD-3-Clause Imports: 8 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)

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 (bqs *BatchQueryShard) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson marshals BatchQueryShard into buf.

func (*BatchQueryShard) UnmarshalBson

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

UnmarshalBson unmarshals BatchQueryShard from buf.

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 (qr *QueryResult) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson marshals QueryResult into buf.

func (*QueryResult) UnmarshalBson

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

UnmarshalBson unmarshals QueryResult from buf.

type QueryResultList

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

QueryResultList is mproto.QueryResultList+Session

func (*QueryResultList) MarshalBson

func (qrl *QueryResultList) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson marshals QueryResultList into buf.

func (*QueryResultList) UnmarshalBson

func (qrl *QueryResultList) UnmarshalBson(buf *bytes.Buffer, kind byte)

UnmarshalBson unmarshals QueryResultList from buf.

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 (qrs *QueryShard) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson marshals QueryShard into buf.

func (*QueryShard) UnmarshalBson

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

UnmarshalBson unmarshals QueryShard from buf.

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 marshals Session into buf.

func (*Session) String

func (session *Session) String() string

func (*Session) UnmarshalBson

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

UnmarshalBson unmarshals Session from buf.

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 marshals ShardSession into buf.

func (*ShardSession) UnmarshalBson

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

UnmarshalBson unmarshals ShardSession from buf.

type StreamQueryKeyRange

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

func (*StreamQueryKeyRange) MarshalBson

func (sqs *StreamQueryKeyRange) MarshalBson(buf *bytes2.ChunkedWriter, key string)

func (*StreamQueryKeyRange) UnmarshalBson

func (sqs *StreamQueryKeyRange) UnmarshalBson(buf *bytes.Buffer, kind byte)

Jump to

Keyboard shortcuts

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