query

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

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

Go to latest
Published: Apr 15, 2016 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Overview

Package query is a generated protocol buffer package.

It is generated from these files:

query.proto

It has these top-level messages:

Target
VTGateCallerID
Value
BindVariable
BoundQuery
Field
Row
QueryResult
GetSessionIdRequest
GetSessionIdResponse
ExecuteRequest
ExecuteResponse
ExecuteBatchRequest
ExecuteBatchResponse
StreamExecuteRequest
StreamExecuteResponse
BeginRequest
BeginResponse
CommitRequest
CommitResponse
RollbackRequest
RollbackResponse
SplitQueryRequest
QuerySplit
SplitQueryResponse
StreamHealthRequest
RealtimeStats
StreamHealthResponse

Index

Constants

This section is empty.

Variables

View Source
var Flag_name = map[int32]string{
	0:    "NONE",
	256:  "ISINTEGRAL",
	512:  "ISUNSIGNED",
	1024: "ISFLOAT",
	2048: "ISQUOTED",
	4096: "ISTEXT",
	8192: "ISBINARY",
}
View Source
var Flag_value = map[string]int32{
	"NONE":       0,
	"ISINTEGRAL": 256,
	"ISUNSIGNED": 512,
	"ISFLOAT":    1024,
	"ISQUOTED":   2048,
	"ISTEXT":     4096,
	"ISBINARY":   8192,
}
View Source
var SplitQueryRequest_Algorithm_name = map[int32]string{
	0: "EQUAL_SPLITS",
	1: "FULL_SCAN",
}
View Source
var SplitQueryRequest_Algorithm_value = map[string]int32{
	"EQUAL_SPLITS": 0,
	"FULL_SCAN":    1,
}
View Source
var Type_name = map[int32]string{
	0:     "NULL_TYPE",
	257:   "INT8",
	770:   "UINT8",
	259:   "INT16",
	772:   "UINT16",
	261:   "INT24",
	774:   "UINT24",
	263:   "INT32",
	776:   "UINT32",
	265:   "INT64",
	778:   "UINT64",
	1035:  "FLOAT32",
	1036:  "FLOAT64",
	2061:  "TIMESTAMP",
	2062:  "DATE",
	2063:  "TIME",
	2064:  "DATETIME",
	785:   "YEAR",
	18:    "DECIMAL",
	6163:  "TEXT",
	10260: "BLOB",
	6165:  "VARCHAR",
	10262: "VARBINARY",
	6167:  "CHAR",
	10264: "BINARY",
	2073:  "BIT",
	2074:  "ENUM",
	2075:  "SET",
	28:    "TUPLE",
}
View Source
var Type_value = map[string]int32{
	"NULL_TYPE": 0,
	"INT8":      257,
	"UINT8":     770,
	"INT16":     259,
	"UINT16":    772,
	"INT24":     261,
	"UINT24":    774,
	"INT32":     263,
	"UINT32":    776,
	"INT64":     265,
	"UINT64":    778,
	"FLOAT32":   1035,
	"FLOAT64":   1036,
	"TIMESTAMP": 2061,
	"DATE":      2062,
	"TIME":      2063,
	"DATETIME":  2064,
	"YEAR":      785,
	"DECIMAL":   18,
	"TEXT":      6163,
	"BLOB":      10260,
	"VARCHAR":   6165,
	"VARBINARY": 10262,
	"CHAR":      6167,
	"BINARY":    10264,
	"BIT":       2073,
	"ENUM":      2074,
	"SET":       2075,
	"TUPLE":     28,
}

Functions

This section is empty.

Types

type BeginRequest

type BeginRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	SessionId         int64           `protobuf:"varint,4,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

BeginRequest is the payload to Begin

func (*BeginRequest) Descriptor

func (*BeginRequest) Descriptor() ([]byte, []int)

func (*BeginRequest) GetEffectiveCallerId

func (m *BeginRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*BeginRequest) GetImmediateCallerId

func (m *BeginRequest) GetImmediateCallerId() *VTGateCallerID

func (*BeginRequest) GetTarget

func (m *BeginRequest) GetTarget() *Target

func (*BeginRequest) ProtoMessage

func (*BeginRequest) ProtoMessage()

func (*BeginRequest) Reset

func (m *BeginRequest) Reset()

func (*BeginRequest) String

func (m *BeginRequest) String() string

type BeginResponse

type BeginResponse struct {
	TransactionId int64 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId" json:"transaction_id,omitempty"`
}

BeginResponse is the returned value from Begin

func (*BeginResponse) Descriptor

func (*BeginResponse) Descriptor() ([]byte, []int)

func (*BeginResponse) ProtoMessage

func (*BeginResponse) ProtoMessage()

func (*BeginResponse) Reset

func (m *BeginResponse) Reset()

func (*BeginResponse) String

func (m *BeginResponse) String() string

type BindVariable

type BindVariable struct {
	Type  Type   `protobuf:"varint,1,opt,name=type,enum=query.Type" json:"type,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// values are set if type is TUPLE.
	Values []*Value `protobuf:"bytes,3,rep,name=values" json:"values,omitempty"`
}

BindVariable represents a single bind variable in a Query.

func (*BindVariable) Descriptor

func (*BindVariable) Descriptor() ([]byte, []int)

func (*BindVariable) GetValues

func (m *BindVariable) GetValues() []*Value

func (*BindVariable) ProtoMessage

func (*BindVariable) ProtoMessage()

func (*BindVariable) Reset

func (m *BindVariable) Reset()

func (*BindVariable) String

func (m *BindVariable) String() string

type BoundQuery

type BoundQuery struct {
	// sql is the SQL query to execute
	Sql string `protobuf:"bytes,1,opt,name=sql" json:"sql,omitempty"`
	// bind_variables is a map of all bind variables to expand in the query
	BindVariables map[string]*BindVariable `` /* 167-byte string literal not displayed */
}

BoundQuery is a query with its bind variables

func (*BoundQuery) Descriptor

func (*BoundQuery) Descriptor() ([]byte, []int)

func (*BoundQuery) GetBindVariables

func (m *BoundQuery) GetBindVariables() map[string]*BindVariable

func (*BoundQuery) ProtoMessage

func (*BoundQuery) ProtoMessage()

func (*BoundQuery) Reset

func (m *BoundQuery) Reset()

func (*BoundQuery) String

func (m *BoundQuery) String() string

type CommitRequest

type CommitRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	TransactionId     int64           `protobuf:"varint,4,opt,name=transaction_id,json=transactionId" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,5,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

CommitRequest is the payload to Commit

func (*CommitRequest) Descriptor

func (*CommitRequest) Descriptor() ([]byte, []int)

func (*CommitRequest) GetEffectiveCallerId

func (m *CommitRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*CommitRequest) GetImmediateCallerId

func (m *CommitRequest) GetImmediateCallerId() *VTGateCallerID

func (*CommitRequest) GetTarget

func (m *CommitRequest) GetTarget() *Target

func (*CommitRequest) ProtoMessage

func (*CommitRequest) ProtoMessage()

func (*CommitRequest) Reset

func (m *CommitRequest) Reset()

func (*CommitRequest) String

func (m *CommitRequest) String() string

type CommitResponse

type CommitResponse struct {
}

CommitResponse is the returned value from Commit

func (*CommitResponse) Descriptor

func (*CommitResponse) Descriptor() ([]byte, []int)

func (*CommitResponse) ProtoMessage

func (*CommitResponse) ProtoMessage()

func (*CommitResponse) Reset

func (m *CommitResponse) Reset()

func (*CommitResponse) String

func (m *CommitResponse) String() string

type ExecuteBatchRequest

type ExecuteBatchRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Queries           []*BoundQuery   `protobuf:"bytes,4,rep,name=queries" json:"queries,omitempty"`
	AsTransaction     bool            `protobuf:"varint,5,opt,name=as_transaction,json=asTransaction" json:"as_transaction,omitempty"`
	TransactionId     int64           `protobuf:"varint,6,opt,name=transaction_id,json=transactionId" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,7,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

ExecuteBatchRequest is the payload to ExecuteBatch

func (*ExecuteBatchRequest) Descriptor

func (*ExecuteBatchRequest) Descriptor() ([]byte, []int)

func (*ExecuteBatchRequest) GetEffectiveCallerId

func (m *ExecuteBatchRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*ExecuteBatchRequest) GetImmediateCallerId

func (m *ExecuteBatchRequest) GetImmediateCallerId() *VTGateCallerID

func (*ExecuteBatchRequest) GetQueries

func (m *ExecuteBatchRequest) GetQueries() []*BoundQuery

func (*ExecuteBatchRequest) GetTarget

func (m *ExecuteBatchRequest) GetTarget() *Target

func (*ExecuteBatchRequest) ProtoMessage

func (*ExecuteBatchRequest) ProtoMessage()

func (*ExecuteBatchRequest) Reset

func (m *ExecuteBatchRequest) Reset()

func (*ExecuteBatchRequest) String

func (m *ExecuteBatchRequest) String() string

type ExecuteBatchResponse

type ExecuteBatchResponse struct {
	Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
}

ExecuteBatchResponse is the returned value from ExecuteBatch

func (*ExecuteBatchResponse) Descriptor

func (*ExecuteBatchResponse) Descriptor() ([]byte, []int)

func (*ExecuteBatchResponse) GetResults

func (m *ExecuteBatchResponse) GetResults() []*QueryResult

func (*ExecuteBatchResponse) ProtoMessage

func (*ExecuteBatchResponse) ProtoMessage()

func (*ExecuteBatchResponse) Reset

func (m *ExecuteBatchResponse) Reset()

func (*ExecuteBatchResponse) String

func (m *ExecuteBatchResponse) String() string

type ExecuteRequest

type ExecuteRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Query             *BoundQuery     `protobuf:"bytes,4,opt,name=query" json:"query,omitempty"`
	TransactionId     int64           `protobuf:"varint,5,opt,name=transaction_id,json=transactionId" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,6,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

ExecuteRequest is the payload to Execute

func (*ExecuteRequest) Descriptor

func (*ExecuteRequest) Descriptor() ([]byte, []int)

func (*ExecuteRequest) GetEffectiveCallerId

func (m *ExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*ExecuteRequest) GetImmediateCallerId

func (m *ExecuteRequest) GetImmediateCallerId() *VTGateCallerID

func (*ExecuteRequest) GetQuery

func (m *ExecuteRequest) GetQuery() *BoundQuery

func (*ExecuteRequest) GetTarget

func (m *ExecuteRequest) GetTarget() *Target

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) Reset

func (m *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (m *ExecuteRequest) String() string

type ExecuteResponse

type ExecuteResponse struct {
	Result *QueryResult `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
}

ExecuteResponse is the returned value from Execute

func (*ExecuteResponse) Descriptor

func (*ExecuteResponse) Descriptor() ([]byte, []int)

func (*ExecuteResponse) GetResult

func (m *ExecuteResponse) GetResult() *QueryResult

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) Reset

func (m *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (m *ExecuteResponse) String() string

type Field

type Field struct {
	// name of the field as returned by mysql C API
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// vitess-defined type. Conversion function is in sqltypes package.
	Type Type `protobuf:"varint,2,opt,name=type,enum=query.Type" json:"type,omitempty"`
}

Field describes a single column returned by a query

func (*Field) Descriptor

func (*Field) Descriptor() ([]byte, []int)

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) String

func (m *Field) String() string

type Flag

type Flag int32

Flag allows us to qualify types by their common properties.

const (
	Flag_NONE       Flag = 0
	Flag_ISINTEGRAL Flag = 256
	Flag_ISUNSIGNED Flag = 512
	Flag_ISFLOAT    Flag = 1024
	Flag_ISQUOTED   Flag = 2048
	Flag_ISTEXT     Flag = 4096
	Flag_ISBINARY   Flag = 8192
)

func (Flag) EnumDescriptor

func (Flag) EnumDescriptor() ([]byte, []int)

func (Flag) String

func (x Flag) String() string

type GetSessionIdRequest

type GetSessionIdRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Keyspace          string          `protobuf:"bytes,3,opt,name=keyspace" json:"keyspace,omitempty"`
	Shard             string          `protobuf:"bytes,4,opt,name=shard" json:"shard,omitempty"`
}

GetSessionIdRequest is the payload to GetSessionId

func (*GetSessionIdRequest) Descriptor

func (*GetSessionIdRequest) Descriptor() ([]byte, []int)

func (*GetSessionIdRequest) GetEffectiveCallerId

func (m *GetSessionIdRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*GetSessionIdRequest) GetImmediateCallerId

func (m *GetSessionIdRequest) GetImmediateCallerId() *VTGateCallerID

func (*GetSessionIdRequest) ProtoMessage

func (*GetSessionIdRequest) ProtoMessage()

func (*GetSessionIdRequest) Reset

func (m *GetSessionIdRequest) Reset()

func (*GetSessionIdRequest) String

func (m *GetSessionIdRequest) String() string

type GetSessionIdResponse

type GetSessionIdResponse struct {
	SessionId int64 `protobuf:"varint,1,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

GetSessionIdResponse is the returned value from GetSessionId

func (*GetSessionIdResponse) Descriptor

func (*GetSessionIdResponse) Descriptor() ([]byte, []int)

func (*GetSessionIdResponse) ProtoMessage

func (*GetSessionIdResponse) ProtoMessage()

func (*GetSessionIdResponse) Reset

func (m *GetSessionIdResponse) Reset()

func (*GetSessionIdResponse) String

func (m *GetSessionIdResponse) String() string

type QueryResult

type QueryResult struct {
	Fields       []*Field `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"`
	RowsAffected uint64   `protobuf:"varint,2,opt,name=rows_affected,json=rowsAffected" json:"rows_affected,omitempty"`
	InsertId     uint64   `protobuf:"varint,3,opt,name=insert_id,json=insertId" json:"insert_id,omitempty"`
	Rows         []*Row   `protobuf:"bytes,4,rep,name=rows" json:"rows,omitempty"`
}

QueryResult is returned by Execute and ExecuteStream.

As returned by Execute, len(fields) is always equal to len(row) (for each row in rows).

As returned by StreamExecute, the first QueryResult has the fields set, and subsequent QueryResult have rows set. And as Execute, len(QueryResult[0].fields) is always equal to len(row) (for each row in rows for each QueryResult in QueryResult[1:]).

func (*QueryResult) Descriptor

func (*QueryResult) Descriptor() ([]byte, []int)

func (*QueryResult) GetFields

func (m *QueryResult) GetFields() []*Field

func (*QueryResult) GetRows

func (m *QueryResult) GetRows() []*Row

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) Reset

func (m *QueryResult) Reset()

func (*QueryResult) String

func (m *QueryResult) String() string

type QuerySplit

type QuerySplit struct {
	// query is the query to execute
	Query *BoundQuery `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
	// row_count is the approximate row count the query will return
	RowCount int64 `protobuf:"varint,2,opt,name=row_count,json=rowCount" json:"row_count,omitempty"`
}

QuerySplit represents one query to execute on the tablet

func (*QuerySplit) Descriptor

func (*QuerySplit) Descriptor() ([]byte, []int)

func (*QuerySplit) GetQuery

func (m *QuerySplit) GetQuery() *BoundQuery

func (*QuerySplit) ProtoMessage

func (*QuerySplit) ProtoMessage()

func (*QuerySplit) Reset

func (m *QuerySplit) Reset()

func (*QuerySplit) String

func (m *QuerySplit) String() string

type RealtimeStats

type RealtimeStats struct {
	// health_error is the last error we got from health check,
	// or empty is the server is healthy. This is used for subset selection,
	// we do not send queries to servers that are not healthy.
	HealthError string `protobuf:"bytes,1,opt,name=health_error,json=healthError" json:"health_error,omitempty"`
	// seconds_behind_master is populated for slaves only. It indicates
	// how far behind on (MySQL) replication a slave currently is.  It is used
	// by clients for subset selection (so we don't try to send traffic
	// to tablets that are too far behind).
	// NOTE: This field must not be evaluated if "health_error" is not empty.
	// TODO(mberlin): Let's switch it to int64 instead?
	SecondsBehindMaster uint32 `protobuf:"varint,2,opt,name=seconds_behind_master,json=secondsBehindMaster" json:"seconds_behind_master,omitempty"`
	// bin_log_players_count is the number of currently running binlog players.
	// if the value is 0, it means that filtered replication is currently not
	// running on the tablet. If >0, filtered replication is running.
	// NOTE: This field must not be evaluated if "health_error" is not empty.
	BinlogPlayersCount int32 `protobuf:"varint,3,opt,name=binlog_players_count,json=binlogPlayersCount" json:"binlog_players_count,omitempty"`
	// seconds_behind_master_filtered_replication is populated for the receiving
	// master of an ongoing filtered replication only.
	// It specifies how far the receiving master lags behind the sending master.
	// NOTE: This field must not be evaluated if "health_error" is not empty.
	// NOTE: This field must not be evaluated if "bin_log_players_count" is 0.
	SecondsBehindMasterFilteredReplication int64 `` /* 175-byte string literal not displayed */
	// cpu_usage is used for load-based balancing
	CpuUsage float64 `protobuf:"fixed64,5,opt,name=cpu_usage,json=cpuUsage" json:"cpu_usage,omitempty"`
	// qps is the average QPS (queries per second) rate in the last XX seconds
	// where XX is usually 60 (See query_service_stats.go).
	Qps float64 `protobuf:"fixed64,6,opt,name=qps" json:"qps,omitempty"`
}

RealtimeStats contains information about the tablet status

func (*RealtimeStats) Descriptor

func (*RealtimeStats) Descriptor() ([]byte, []int)

func (*RealtimeStats) ProtoMessage

func (*RealtimeStats) ProtoMessage()

func (*RealtimeStats) Reset

func (m *RealtimeStats) Reset()

func (*RealtimeStats) String

func (m *RealtimeStats) String() string

type RollbackRequest

type RollbackRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	TransactionId     int64           `protobuf:"varint,4,opt,name=transaction_id,json=transactionId" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,5,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

RollbackRequest is the payload to Rollback

func (*RollbackRequest) Descriptor

func (*RollbackRequest) Descriptor() ([]byte, []int)

func (*RollbackRequest) GetEffectiveCallerId

func (m *RollbackRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*RollbackRequest) GetImmediateCallerId

func (m *RollbackRequest) GetImmediateCallerId() *VTGateCallerID

func (*RollbackRequest) GetTarget

func (m *RollbackRequest) GetTarget() *Target

func (*RollbackRequest) ProtoMessage

func (*RollbackRequest) ProtoMessage()

func (*RollbackRequest) Reset

func (m *RollbackRequest) Reset()

func (*RollbackRequest) String

func (m *RollbackRequest) String() string

type RollbackResponse

type RollbackResponse struct {
}

RollbackResponse is the returned value from Rollback

func (*RollbackResponse) Descriptor

func (*RollbackResponse) Descriptor() ([]byte, []int)

func (*RollbackResponse) ProtoMessage

func (*RollbackResponse) ProtoMessage()

func (*RollbackResponse) Reset

func (m *RollbackResponse) Reset()

func (*RollbackResponse) String

func (m *RollbackResponse) String() string

type Row

type Row struct {
	// lengths contains the length of each value in values.
	// A length of -1 means that the field is NULL. While
	// reading values, you have to accummulate the length
	// to know the offset where the next value begins in values.
	Lengths []int64 `protobuf:"zigzag64,1,rep,name=lengths" json:"lengths,omitempty"`
	// values contains a concatenation of all values in the row.
	Values []byte `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"`
}

Row is a database row.

func (*Row) Descriptor

func (*Row) Descriptor() ([]byte, []int)

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) Reset

func (m *Row) Reset()

func (*Row) String

func (m *Row) String() string

type SplitQueryRequest

type SplitQueryRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Query             *BoundQuery     `protobuf:"bytes,4,opt,name=query" json:"query,omitempty"`
	SplitColumn       []string        `protobuf:"bytes,5,rep,name=split_column,json=splitColumn" json:"split_column,omitempty"`
	// Exactly one of the following must be nonzero.
	SplitCount          int64                       `protobuf:"varint,6,opt,name=split_count,json=splitCount" json:"split_count,omitempty"`
	NumRowsPerQueryPart int64                       `protobuf:"varint,8,opt,name=num_rows_per_query_part,json=numRowsPerQueryPart" json:"num_rows_per_query_part,omitempty"`
	SessionId           int64                       `protobuf:"varint,7,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
	Algorithm           SplitQueryRequest_Algorithm `protobuf:"varint,9,opt,name=algorithm,enum=query.SplitQueryRequest_Algorithm" json:"algorithm,omitempty"`
	// Whether to use the new split-query code
	// that supports multiple split-columns and
	// the FULL_SCAN algorithm.
	// This is a temporary field which aids
	// in the migration of SplitQuery to the new
	// code.
	// TODO(erez): Remove this field after the migration
	// to the SplitQuery version 2.
	UseSplitQueryV2 bool `protobuf:"varint,10,opt,name=use_split_query_v2,json=useSplitQueryV2" json:"use_split_query_v2,omitempty"`
}

SplitQueryRequest is the payload for SplitQuery sent by VTGate to a VTTablet. See vtgate.SplitQueryRequest for more details.

func (*SplitQueryRequest) Descriptor

func (*SplitQueryRequest) Descriptor() ([]byte, []int)

func (*SplitQueryRequest) GetEffectiveCallerId

func (m *SplitQueryRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*SplitQueryRequest) GetImmediateCallerId

func (m *SplitQueryRequest) GetImmediateCallerId() *VTGateCallerID

func (*SplitQueryRequest) GetQuery

func (m *SplitQueryRequest) GetQuery() *BoundQuery

func (*SplitQueryRequest) GetTarget

func (m *SplitQueryRequest) GetTarget() *Target

func (*SplitQueryRequest) ProtoMessage

func (*SplitQueryRequest) ProtoMessage()

func (*SplitQueryRequest) Reset

func (m *SplitQueryRequest) Reset()

func (*SplitQueryRequest) String

func (m *SplitQueryRequest) String() string

type SplitQueryRequest_Algorithm

type SplitQueryRequest_Algorithm int32
const (
	SplitQueryRequest_EQUAL_SPLITS SplitQueryRequest_Algorithm = 0
	SplitQueryRequest_FULL_SCAN    SplitQueryRequest_Algorithm = 1
)

func (SplitQueryRequest_Algorithm) EnumDescriptor

func (SplitQueryRequest_Algorithm) EnumDescriptor() ([]byte, []int)

func (SplitQueryRequest_Algorithm) String

type SplitQueryResponse

type SplitQueryResponse struct {
	Queries []*QuerySplit `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"`
}

SplitQueryResponse is returned by SplitQuery and represents all the queries to execute in order to get the entire data set.

func (*SplitQueryResponse) Descriptor

func (*SplitQueryResponse) Descriptor() ([]byte, []int)

func (*SplitQueryResponse) GetQueries

func (m *SplitQueryResponse) GetQueries() []*QuerySplit

func (*SplitQueryResponse) ProtoMessage

func (*SplitQueryResponse) ProtoMessage()

func (*SplitQueryResponse) Reset

func (m *SplitQueryResponse) Reset()

func (*SplitQueryResponse) String

func (m *SplitQueryResponse) String() string

type StreamExecuteRequest

type StreamExecuteRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Query             *BoundQuery     `protobuf:"bytes,4,opt,name=query" json:"query,omitempty"`
	SessionId         int64           `protobuf:"varint,5,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

StreamExecuteRequest is the payload to StreamExecute

func (*StreamExecuteRequest) Descriptor

func (*StreamExecuteRequest) Descriptor() ([]byte, []int)

func (*StreamExecuteRequest) GetEffectiveCallerId

func (m *StreamExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*StreamExecuteRequest) GetImmediateCallerId

func (m *StreamExecuteRequest) GetImmediateCallerId() *VTGateCallerID

func (*StreamExecuteRequest) GetQuery

func (m *StreamExecuteRequest) GetQuery() *BoundQuery

func (*StreamExecuteRequest) GetTarget

func (m *StreamExecuteRequest) GetTarget() *Target

func (*StreamExecuteRequest) ProtoMessage

func (*StreamExecuteRequest) ProtoMessage()

func (*StreamExecuteRequest) Reset

func (m *StreamExecuteRequest) Reset()

func (*StreamExecuteRequest) String

func (m *StreamExecuteRequest) String() string

type StreamExecuteResponse

type StreamExecuteResponse struct {
	Result *QueryResult `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
}

StreamExecuteResponse is the returned value from StreamExecute

func (*StreamExecuteResponse) Descriptor

func (*StreamExecuteResponse) Descriptor() ([]byte, []int)

func (*StreamExecuteResponse) GetResult

func (m *StreamExecuteResponse) GetResult() *QueryResult

func (*StreamExecuteResponse) ProtoMessage

func (*StreamExecuteResponse) ProtoMessage()

func (*StreamExecuteResponse) Reset

func (m *StreamExecuteResponse) Reset()

func (*StreamExecuteResponse) String

func (m *StreamExecuteResponse) String() string

type StreamHealthRequest

type StreamHealthRequest struct {
}

StreamHealthRequest is the payload for StreamHealth

func (*StreamHealthRequest) Descriptor

func (*StreamHealthRequest) Descriptor() ([]byte, []int)

func (*StreamHealthRequest) ProtoMessage

func (*StreamHealthRequest) ProtoMessage()

func (*StreamHealthRequest) Reset

func (m *StreamHealthRequest) Reset()

func (*StreamHealthRequest) String

func (m *StreamHealthRequest) String() string

type StreamHealthResponse

type StreamHealthResponse struct {
	// target is the current server type. Only queries with that exact Target
	// record will be accepted.
	Target *Target `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
	// serving is true iff the tablet is serving. A tablet may not be serving
	// if filtered replication is enabled on a master for instance,
	// or if a replica should not be used because the keyspace is being resharded.
	Serving bool `protobuf:"varint,2,opt,name=serving" json:"serving,omitempty"`
	// tablet_externally_reparented_timestamp contains the last time
	// tabletmanager.TabletExternallyReparented was called on this tablet,
	// or 0 if it was never called. This is meant to differentiate two tablets
	// that report a target.TabletType of MASTER, only the one with the latest
	// timestamp should be trusted.
	TabletExternallyReparentedTimestamp int64 `` /* 164-byte string literal not displayed */
	// realtime_stats contains information about the tablet status
	RealtimeStats *RealtimeStats `protobuf:"bytes,4,opt,name=realtime_stats,json=realtimeStats" json:"realtime_stats,omitempty"`
}

StreamHealthResponse is streamed by StreamHealth on a regular basis

func (*StreamHealthResponse) Descriptor

func (*StreamHealthResponse) Descriptor() ([]byte, []int)

func (*StreamHealthResponse) GetRealtimeStats

func (m *StreamHealthResponse) GetRealtimeStats() *RealtimeStats

func (*StreamHealthResponse) GetTarget

func (m *StreamHealthResponse) GetTarget() *Target

func (*StreamHealthResponse) ProtoMessage

func (*StreamHealthResponse) ProtoMessage()

func (*StreamHealthResponse) Reset

func (m *StreamHealthResponse) Reset()

func (*StreamHealthResponse) String

func (m *StreamHealthResponse) String() string

type Target

type Target struct {
	Keyspace   string              `protobuf:"bytes,1,opt,name=keyspace" json:"keyspace,omitempty"`
	Shard      string              `protobuf:"bytes,2,opt,name=shard" json:"shard,omitempty"`
	TabletType topodata.TabletType `protobuf:"varint,3,opt,name=tablet_type,json=tabletType,enum=topodata.TabletType" json:"tablet_type,omitempty"`
}

Target describes what the client expects the tablet is. If the tablet does not match, an error is returned.

func (*Target) Descriptor

func (*Target) Descriptor() ([]byte, []int)

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) Reset

func (m *Target) Reset()

func (*Target) String

func (m *Target) String() string

type Type

type Type int32

Type defines the various supported data types in bind vars and query results.

const (
	// NULL_TYPE specifies a NULL type.
	Type_NULL_TYPE Type = 0
	// INT8 specifies a TINYINT type.
	// Properties: 1, IsNumber.
	Type_INT8 Type = 257
	// UINT8 specifies a TINYINT UNSIGNED type.
	// Properties: 2, IsNumber, IsUnsigned.
	Type_UINT8 Type = 770
	// INT16 specifies a SMALLINT type.
	// Properties: 3, IsNumber.
	Type_INT16 Type = 259
	// UINT16 specifies a SMALLINT UNSIGNED type.
	// Properties: 4, IsNumber, IsUnsigned.
	Type_UINT16 Type = 772
	// INT24 specifies a MEDIUMINT type.
	// Properties: 5, IsNumber.
	Type_INT24 Type = 261
	// UINT24 specifies a MEDIUMINT UNSIGNED type.
	// Properties: 6, IsNumber, IsUnsigned.
	Type_UINT24 Type = 774
	// INT32 specifies a INTEGER type.
	// Properties: 7, IsNumber.
	Type_INT32 Type = 263
	// UINT32 specifies a INTEGER UNSIGNED type.
	// Properties: 8, IsNumber, IsUnsigned.
	Type_UINT32 Type = 776
	// INT64 specifies a BIGINT type.
	// Properties: 9, IsNumber.
	Type_INT64 Type = 265
	// UINT64 specifies a BIGINT UNSIGNED type.
	// Properties: 10, IsNumber, IsUnsigned.
	Type_UINT64 Type = 778
	// FLOAT32 specifies a FLOAT type.
	// Properties: 11, IsFloat.
	Type_FLOAT32 Type = 1035
	// FLOAT64 specifies a DOUBLE or REAL type.
	// Properties: 12, IsFloat.
	Type_FLOAT64 Type = 1036
	// TIMESTAMP specifies a TIMESTAMP type.
	// Properties: 13, IsQuoted.
	Type_TIMESTAMP Type = 2061
	// DATE specifies a DATE type.
	// Properties: 14, IsQuoted.
	Type_DATE Type = 2062
	// TIME specifies a TIME type.
	// Properties: 15, IsQuoted.
	Type_TIME Type = 2063
	// DATETIME specifies a DATETIME type.
	// Properties: 16, IsQuoted.
	Type_DATETIME Type = 2064
	// YEAR specifies a YEAR type.
	// Properties: 17, IsNumber, IsUnsigned.
	Type_YEAR Type = 785
	// DECIMAL specifies a DECIMAL or NUMERIC type.
	// Properties: 18, None.
	Type_DECIMAL Type = 18
	// TEXT specifies a TEXT type.
	// Properties: 19, IsQuoted, IsText.
	Type_TEXT Type = 6163
	// BLOB specifies a BLOB type.
	// Properties: 20, IsQuoted, IsBinary.
	Type_BLOB Type = 10260
	// VARCHAR specifies a VARCHAR type.
	// Properties: 21, IsQuoted, IsText.
	Type_VARCHAR Type = 6165
	// VARBINARY specifies a VARBINARY type.
	// Properties: 22, IsQuoted, IsBinary.
	Type_VARBINARY Type = 10262
	// CHAR specifies a CHAR type.
	// Properties: 23, IsQuoted, IsText.
	Type_CHAR Type = 6167
	// BINARY specifies a BINARY type.
	// Properties: 24, IsQuoted, IsBinary.
	Type_BINARY Type = 10264
	// BIT specifies a BIT type.
	// Properties: 25, IsQuoted.
	Type_BIT Type = 2073
	// ENUM specifies an ENUM type.
	// Properties: 26, IsQuoted.
	Type_ENUM Type = 2074
	// SET specifies a SET type.
	// Properties: 27, IsQuoted.
	Type_SET Type = 2075
	// TUPLE specifies a a tuple. This cannot
	// be returned in a QueryResult, but it can
	// be sent as a bind var.
	// Properties: 28, None.
	Type_TUPLE Type = 28
)

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

type VTGateCallerID

type VTGateCallerID struct {
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
}

VTGateCallerID is sent by VTGate to VTTablet to describe the caller. If possible, this information is secure. For instance, if using unique certificates that guarantee that VTGate->VTTablet traffic cannot be spoofed, then VTTablet can trust this information, and VTTablet will use it for tablet ACLs, for instance. Because of this security guarantee, this is different than the CallerID structure, which is not secure at all, because it is provided by the Vitess client.

func (*VTGateCallerID) Descriptor

func (*VTGateCallerID) Descriptor() ([]byte, []int)

func (*VTGateCallerID) ProtoMessage

func (*VTGateCallerID) ProtoMessage()

func (*VTGateCallerID) Reset

func (m *VTGateCallerID) Reset()

func (*VTGateCallerID) String

func (m *VTGateCallerID) String() string

type Value

type Value struct {
	Type  Type   `protobuf:"varint,1,opt,name=type,enum=query.Type" json:"type,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

Value represents a typed value.

func (*Value) Descriptor

func (*Value) Descriptor() ([]byte, []int)

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

Jump to

Keyboard shortcuts

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