Documentation ¶
Index ¶
- Variables
- type BindVariable
- func (*BindVariable) Descriptor() ([]byte, []int)
- func (m *BindVariable) GetType() Type
- func (m *BindVariable) GetValue() []byte
- func (m *BindVariable) GetValues() []*Value
- func (*BindVariable) ProtoMessage()
- func (m *BindVariable) Reset()
- func (m *BindVariable) String() string
- func (m *BindVariable) XXX_DiscardUnknown()
- func (m *BindVariable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BindVariable) XXX_Merge(src proto.Message)
- func (m *BindVariable) XXX_Size() int
- func (m *BindVariable) XXX_Unmarshal(b []byte) error
- type BoundQuery
- func (*BoundQuery) Descriptor() ([]byte, []int)
- func (m *BoundQuery) GetBindVariables() map[string]*BindVariable
- func (m *BoundQuery) GetSql() string
- func (*BoundQuery) ProtoMessage()
- func (m *BoundQuery) Reset()
- func (m *BoundQuery) String() string
- func (m *BoundQuery) XXX_DiscardUnknown()
- func (m *BoundQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BoundQuery) XXX_Merge(src proto.Message)
- func (m *BoundQuery) XXX_Size() int
- func (m *BoundQuery) XXX_Unmarshal(b []byte) error
- type CallerID
- func (*CallerID) Descriptor() ([]byte, []int)
- func (m *CallerID) GetComponent() string
- func (m *CallerID) GetPrincipal() string
- func (m *CallerID) GetSubcomponent() string
- func (*CallerID) ProtoMessage()
- func (m *CallerID) Reset()
- func (m *CallerID) String() string
- func (m *CallerID) XXX_DiscardUnknown()
- func (m *CallerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CallerID) XXX_Merge(src proto.Message)
- func (m *CallerID) XXX_Size() int
- func (m *CallerID) XXX_Unmarshal(b []byte) error
- type Code
- type EventToken
- func (*EventToken) Descriptor() ([]byte, []int)
- func (m *EventToken) GetPosition() string
- func (m *EventToken) GetShard() string
- func (m *EventToken) GetTimestamp() int64
- func (*EventToken) ProtoMessage()
- func (m *EventToken) Reset()
- func (m *EventToken) String() string
- func (m *EventToken) XXX_DiscardUnknown()
- func (m *EventToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventToken) XXX_Merge(src proto.Message)
- func (m *EventToken) XXX_Size() int
- func (m *EventToken) XXX_Unmarshal(b []byte) error
- type ExecuteOptions
- func (*ExecuteOptions) Descriptor() ([]byte, []int)
- func (m *ExecuteOptions) GetClientFoundRows() bool
- func (m *ExecuteOptions) GetCompareEventToken() *EventToken
- func (m *ExecuteOptions) GetIncludeEventToken() bool
- func (m *ExecuteOptions) GetIncludedFields() ExecuteOptions_IncludedFields
- func (m *ExecuteOptions) GetSkipQueryPlanCache() bool
- func (m *ExecuteOptions) GetSqlSelectLimit() int64
- func (m *ExecuteOptions) GetTransactionIsolation() ExecuteOptions_TransactionIsolation
- func (m *ExecuteOptions) GetWorkload() ExecuteOptions_Workload
- func (*ExecuteOptions) ProtoMessage()
- func (m *ExecuteOptions) Reset()
- func (m *ExecuteOptions) String() string
- func (m *ExecuteOptions) XXX_DiscardUnknown()
- func (m *ExecuteOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExecuteOptions) XXX_Merge(src proto.Message)
- func (m *ExecuteOptions) XXX_Size() int
- func (m *ExecuteOptions) XXX_Unmarshal(b []byte) error
- type ExecuteOptions_IncludedFields
- type ExecuteOptions_TransactionIsolation
- type ExecuteOptions_Workload
- type Field
- func (*Field) Descriptor() ([]byte, []int)
- func (m *Field) GetCharset() uint32
- func (m *Field) GetColumnLength() uint32
- func (m *Field) GetDatabase() string
- func (m *Field) GetDecimals() uint32
- func (m *Field) GetFlags() uint32
- func (m *Field) GetName() string
- func (m *Field) GetOrgName() string
- func (m *Field) GetOrgTable() string
- func (m *Field) GetTable() string
- func (m *Field) GetType() Type
- func (*Field) ProtoMessage()
- func (m *Field) Reset()
- func (m *Field) String() string
- func (m *Field) XXX_DiscardUnknown()
- func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Field) XXX_Merge(src proto.Message)
- func (m *Field) XXX_Size() int
- func (m *Field) XXX_Unmarshal(b []byte) error
- type Flag
- type LegacyErrorCode
- type MySqlFlag
- type QueryResult
- func (*QueryResult) Descriptor() ([]byte, []int)
- func (m *QueryResult) GetExtras() *ResultExtras
- func (m *QueryResult) GetFields() []*Field
- func (m *QueryResult) GetInsertId() uint64
- func (m *QueryResult) GetRows() []*Row
- func (m *QueryResult) GetRowsAffected() uint64
- func (*QueryResult) ProtoMessage()
- func (m *QueryResult) Reset()
- func (m *QueryResult) String() string
- func (m *QueryResult) XXX_DiscardUnknown()
- func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryResult) XXX_Merge(src proto.Message)
- func (m *QueryResult) XXX_Size() int
- func (m *QueryResult) XXX_Unmarshal(b []byte) error
- type QueryWarning
- func (*QueryWarning) Descriptor() ([]byte, []int)
- func (m *QueryWarning) GetCode() uint32
- func (m *QueryWarning) GetMessage() string
- func (*QueryWarning) ProtoMessage()
- func (m *QueryWarning) Reset()
- func (m *QueryWarning) String() string
- func (m *QueryWarning) XXX_DiscardUnknown()
- func (m *QueryWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryWarning) XXX_Merge(src proto.Message)
- func (m *QueryWarning) XXX_Size() int
- func (m *QueryWarning) XXX_Unmarshal(b []byte) error
- type RPCError
- func (*RPCError) Descriptor() ([]byte, []int)
- func (m *RPCError) GetCode() Code
- func (m *RPCError) GetLegacyCode() LegacyErrorCode
- func (m *RPCError) GetMessage() string
- func (*RPCError) ProtoMessage()
- func (m *RPCError) Reset()
- func (m *RPCError) String() string
- func (m *RPCError) XXX_DiscardUnknown()
- func (m *RPCError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RPCError) XXX_Merge(src proto.Message)
- func (m *RPCError) XXX_Size() int
- func (m *RPCError) XXX_Unmarshal(b []byte) error
- type ResultExtras
- func (*ResultExtras) Descriptor() ([]byte, []int)
- func (m *ResultExtras) GetEventToken() *EventToken
- func (m *ResultExtras) GetFresher() bool
- func (*ResultExtras) ProtoMessage()
- func (m *ResultExtras) Reset()
- func (m *ResultExtras) String() string
- func (m *ResultExtras) XXX_DiscardUnknown()
- func (m *ResultExtras) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResultExtras) XXX_Merge(src proto.Message)
- func (m *ResultExtras) XXX_Size() int
- func (m *ResultExtras) XXX_Unmarshal(b []byte) error
- type ResultWithError
- func (*ResultWithError) Descriptor() ([]byte, []int)
- func (m *ResultWithError) GetError() *RPCError
- func (m *ResultWithError) GetResult() *QueryResult
- func (*ResultWithError) ProtoMessage()
- func (m *ResultWithError) Reset()
- func (m *ResultWithError) String() string
- func (m *ResultWithError) XXX_DiscardUnknown()
- func (m *ResultWithError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResultWithError) XXX_Merge(src proto.Message)
- func (m *ResultWithError) XXX_Size() int
- func (m *ResultWithError) XXX_Unmarshal(b []byte) error
- type Row
- func (*Row) Descriptor() ([]byte, []int)
- func (m *Row) GetLengths() []int64
- func (m *Row) GetValues() []byte
- func (*Row) ProtoMessage()
- func (m *Row) Reset()
- func (m *Row) String() string
- func (m *Row) XXX_DiscardUnknown()
- func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Row) XXX_Merge(src proto.Message)
- func (m *Row) XXX_Size() int
- func (m *Row) XXX_Unmarshal(b []byte) error
- type StreamEvent
- func (*StreamEvent) Descriptor() ([]byte, []int)
- func (m *StreamEvent) GetEventToken() *EventToken
- func (m *StreamEvent) GetStatements() []*StreamEvent_Statement
- func (*StreamEvent) ProtoMessage()
- func (m *StreamEvent) Reset()
- func (m *StreamEvent) String() string
- func (m *StreamEvent) XXX_DiscardUnknown()
- func (m *StreamEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamEvent) XXX_Merge(src proto.Message)
- func (m *StreamEvent) XXX_Size() int
- func (m *StreamEvent) XXX_Unmarshal(b []byte) error
- type StreamEvent_Statement
- func (*StreamEvent_Statement) Descriptor() ([]byte, []int)
- func (m *StreamEvent_Statement) GetCategory() StreamEvent_Statement_Category
- func (m *StreamEvent_Statement) GetPrimaryKeyFields() []*Field
- func (m *StreamEvent_Statement) GetPrimaryKeyValues() []*Row
- func (m *StreamEvent_Statement) GetSql() []byte
- func (m *StreamEvent_Statement) GetTableName() string
- func (*StreamEvent_Statement) ProtoMessage()
- func (m *StreamEvent_Statement) Reset()
- func (m *StreamEvent_Statement) String() string
- func (m *StreamEvent_Statement) XXX_DiscardUnknown()
- func (m *StreamEvent_Statement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamEvent_Statement) XXX_Merge(src proto.Message)
- func (m *StreamEvent_Statement) XXX_Size() int
- func (m *StreamEvent_Statement) XXX_Unmarshal(b []byte) error
- type StreamEvent_Statement_Category
- type Target
- func (*Target) Descriptor() ([]byte, []int)
- func (m *Target) GetCell() string
- func (m *Target) GetKeyspace() string
- func (m *Target) GetShard() string
- func (*Target) ProtoMessage()
- func (m *Target) Reset()
- func (m *Target) String() string
- func (m *Target) XXX_DiscardUnknown()
- func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Target) XXX_Merge(src proto.Message)
- func (m *Target) XXX_Size() int
- func (m *Target) XXX_Unmarshal(b []byte) error
- type Type
- type VTGateCallerID
- func (*VTGateCallerID) Descriptor() ([]byte, []int)
- func (m *VTGateCallerID) GetGroups() []string
- func (m *VTGateCallerID) GetUsername() string
- func (*VTGateCallerID) ProtoMessage()
- func (m *VTGateCallerID) Reset()
- func (m *VTGateCallerID) String() string
- func (m *VTGateCallerID) XXX_DiscardUnknown()
- func (m *VTGateCallerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VTGateCallerID) XXX_Merge(src proto.Message)
- func (m *VTGateCallerID) XXX_Size() int
- func (m *VTGateCallerID) XXX_Unmarshal(b []byte) error
- type Value
- func (*Value) Descriptor() ([]byte, []int)
- func (m *Value) GetType() Type
- func (m *Value) GetValue() []byte
- func (*Value) ProtoMessage()
- func (m *Value) Reset()
- func (m *Value) String() string
- func (m *Value) XXX_DiscardUnknown()
- func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Value) XXX_Merge(src proto.Message)
- func (m *Value) XXX_Size() int
- func (m *Value) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var Code_name = map[int32]string{
0: "OK",
1: "CANCELED",
2: "UNKNOWN",
3: "INVALID_ARGUMENT",
4: "DEADLINE_EXCEEDED",
5: "NOT_FOUND",
6: "ALREADY_EXISTS",
7: "PERMISSION_DENIED",
16: "UNAUTHENTICATED",
8: "RESOURCE_EXHAUSTED",
9: "FAILED_PRECONDITION",
10: "ABORTED",
11: "OUT_OF_RANGE",
12: "UNIMPLEMENTED",
13: "INTERNAL",
14: "UNAVAILABLE",
15: "DATA_LOSS",
}
var Code_value = map[string]int32{
"OK": 0,
"CANCELED": 1,
"UNKNOWN": 2,
"INVALID_ARGUMENT": 3,
"DEADLINE_EXCEEDED": 4,
"NOT_FOUND": 5,
"ALREADY_EXISTS": 6,
"PERMISSION_DENIED": 7,
"UNAUTHENTICATED": 16,
"RESOURCE_EXHAUSTED": 8,
"FAILED_PRECONDITION": 9,
"ABORTED": 10,
"OUT_OF_RANGE": 11,
"UNIMPLEMENTED": 12,
"INTERNAL": 13,
"UNAVAILABLE": 14,
"DATA_LOSS": 15,
}
var ExecuteOptions_IncludedFields_name = map[int32]string{
0: "TYPE_AND_NAME",
1: "TYPE_ONLY",
2: "ALL",
}
var ExecuteOptions_IncludedFields_value = map[string]int32{
"TYPE_AND_NAME": 0,
"TYPE_ONLY": 1,
"ALL": 2,
}
var ExecuteOptions_TransactionIsolation_name = map[int32]string{
0: "DEFAULT",
1: "REPEATABLE_READ",
2: "READ_COMMITTED",
3: "READ_UNCOMMITTED",
4: "SERIALIZABLE",
5: "CONSISTENT_SNAPSHOT_READ_ONLY",
6: "AUTOCOMMIT",
}
var ExecuteOptions_TransactionIsolation_value = map[string]int32{
"DEFAULT": 0,
"REPEATABLE_READ": 1,
"READ_COMMITTED": 2,
"READ_UNCOMMITTED": 3,
"SERIALIZABLE": 4,
"CONSISTENT_SNAPSHOT_READ_ONLY": 5,
"AUTOCOMMIT": 6,
}
var ExecuteOptions_Workload_name = map[int32]string{
0: "UNSPECIFIED",
1: "OLTP",
2: "OLAP",
3: "DBA",
}
var ExecuteOptions_Workload_value = map[string]int32{
"UNSPECIFIED": 0,
"OLTP": 1,
"OLAP": 2,
"DBA": 3,
}
var Flag_name = map[int32]string{
0: "NONE",
256: "ISINTEGRAL",
512: "ISUNSIGNED",
1024: "ISFLOAT",
2048: "ISQUOTED",
4096: "ISTEXT",
8192: "ISBINARY",
}
var Flag_value = map[string]int32{
"NONE": 0,
"ISINTEGRAL": 256,
"ISUNSIGNED": 512,
"ISFLOAT": 1024,
"ISQUOTED": 2048,
"ISTEXT": 4096,
"ISBINARY": 8192,
}
var LegacyErrorCode_name = map[int32]string{
0: "SUCCESS_LEGACY",
1: "CANCELLED_LEGACY",
2: "UNKNOWN_ERROR_LEGACY",
3: "BAD_INPUT_LEGACY",
4: "DEADLINE_EXCEEDED_LEGACY",
5: "INTEGRITY_ERROR_LEGACY",
6: "PERMISSION_DENIED_LEGACY",
7: "RESOURCE_EXHAUSTED_LEGACY",
8: "QUERY_NOT_SERVED_LEGACY",
9: "NOT_IN_TX_LEGACY",
10: "INTERNAL_ERROR_LEGACY",
11: "TRANSIENT_ERROR_LEGACY",
12: "UNAUTHENTICATED_LEGACY",
}
var LegacyErrorCode_value = map[string]int32{
"SUCCESS_LEGACY": 0,
"CANCELLED_LEGACY": 1,
"UNKNOWN_ERROR_LEGACY": 2,
"BAD_INPUT_LEGACY": 3,
"DEADLINE_EXCEEDED_LEGACY": 4,
"INTEGRITY_ERROR_LEGACY": 5,
"PERMISSION_DENIED_LEGACY": 6,
"RESOURCE_EXHAUSTED_LEGACY": 7,
"QUERY_NOT_SERVED_LEGACY": 8,
"NOT_IN_TX_LEGACY": 9,
"INTERNAL_ERROR_LEGACY": 10,
"TRANSIENT_ERROR_LEGACY": 11,
"UNAUTHENTICATED_LEGACY": 12,
}
var MySqlFlag_name = map[int32]string{
0: "EMPTY",
1: "NOT_NULL_FLAG",
2: "PRI_KEY_FLAG",
4: "UNIQUE_KEY_FLAG",
8: "MULTIPLE_KEY_FLAG",
16: "BLOB_FLAG",
32: "UNSIGNED_FLAG",
64: "ZEROFILL_FLAG",
128: "BINARY_FLAG",
256: "ENUM_FLAG",
512: "AUTO_INCREMENT_FLAG",
1024: "TIMESTAMP_FLAG",
2048: "SET_FLAG",
4096: "NO_DEFAULT_VALUE_FLAG",
8192: "ON_UPDATE_NOW_FLAG",
32768: "NUM_FLAG",
16384: "PART_KEY_FLAG",
65536: "UNIQUE_FLAG",
131072: "BINCMP_FLAG",
}
var MySqlFlag_value = map[string]int32{
"EMPTY": 0,
"NOT_NULL_FLAG": 1,
"PRI_KEY_FLAG": 2,
"UNIQUE_KEY_FLAG": 4,
"MULTIPLE_KEY_FLAG": 8,
"BLOB_FLAG": 16,
"UNSIGNED_FLAG": 32,
"ZEROFILL_FLAG": 64,
"BINARY_FLAG": 128,
"ENUM_FLAG": 256,
"AUTO_INCREMENT_FLAG": 512,
"TIMESTAMP_FLAG": 1024,
"SET_FLAG": 2048,
"NO_DEFAULT_VALUE_FLAG": 4096,
"ON_UPDATE_NOW_FLAG": 8192,
"NUM_FLAG": 32768,
"PART_KEY_FLAG": 16384,
"GROUP_FLAG": 32768,
"UNIQUE_FLAG": 65536,
"BINCMP_FLAG": 131072,
}
var StreamEvent_Statement_Category_name = map[int32]string{
0: "Error",
1: "DML",
2: "DDL",
}
var StreamEvent_Statement_Category_value = map[string]int32{
"Error": 0,
"DML": 1,
"DDL": 2,
}
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",
2077: "GEOMETRY",
2078: "JSON",
31: "EXPRESSION",
}
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,
"GEOMETRY": 2077,
"JSON": 2078,
"EXPRESSION": 31,
}
Functions ¶
This section is empty.
Types ¶
type BindVariable ¶
type BindVariable struct { Type Type `protobuf:"varint,1,opt,name=type,proto3,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,proto3" json:"values,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
BindVariable represents a single bind variable in a Query.
func (*BindVariable) Descriptor ¶
func (*BindVariable) Descriptor() ([]byte, []int)
func (*BindVariable) GetType ¶
func (m *BindVariable) GetType() Type
func (*BindVariable) GetValue ¶
func (m *BindVariable) GetValue() []byte
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
func (*BindVariable) XXX_DiscardUnknown ¶
func (m *BindVariable) XXX_DiscardUnknown()
func (*BindVariable) XXX_Marshal ¶
func (m *BindVariable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BindVariable) XXX_Merge ¶
func (m *BindVariable) XXX_Merge(src proto.Message)
func (*BindVariable) XXX_Size ¶
func (m *BindVariable) XXX_Size() int
func (*BindVariable) XXX_Unmarshal ¶
func (m *BindVariable) XXX_Unmarshal(b []byte) error
type BoundQuery ¶
type BoundQuery struct { // sql is the SQL query to execute Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // bind_variables is a map of all bind variables to expand in the query. // nil values are not allowed. Use NULL_TYPE to express a NULL value. BindVariables map[string]*BindVariable `` /* 188-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) GetSql ¶
func (m *BoundQuery) GetSql() string
func (*BoundQuery) ProtoMessage ¶
func (*BoundQuery) ProtoMessage()
func (*BoundQuery) Reset ¶
func (m *BoundQuery) Reset()
func (*BoundQuery) String ¶
func (m *BoundQuery) String() string
func (*BoundQuery) XXX_DiscardUnknown ¶
func (m *BoundQuery) XXX_DiscardUnknown()
func (*BoundQuery) XXX_Marshal ¶
func (m *BoundQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BoundQuery) XXX_Merge ¶
func (m *BoundQuery) XXX_Merge(src proto.Message)
func (*BoundQuery) XXX_Size ¶
func (m *BoundQuery) XXX_Size() int
func (*BoundQuery) XXX_Unmarshal ¶
func (m *BoundQuery) XXX_Unmarshal(b []byte) error
type CallerID ¶
type CallerID struct { // principal is the effective user identifier. It is usually filled in // with whoever made the request to the appserver, if the request // came from an automated job or another system component. // If the request comes directly from the Internet, or if the Vitess client // takes action on its own accord, it is okay for this field to be absent. Principal string `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` // component describes the running process of the effective caller. // It can for instance be the hostname:port of the servlet initiating the // database call, or the container engine ID used by the servlet. Component string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"` // subcomponent describes a component inisde the immediate caller which // is responsible for generating is request. Suggested values are a // servlet name or an API endpoint name. Subcomponent string `protobuf:"bytes,3,opt,name=subcomponent,proto3" json:"subcomponent,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CallerID is passed along RPCs to identify the originating client for a request. It is not meant to be secure, but only informational. The client can put whatever info they want in these fields, and they will be trusted by the servers. The fields will just be used for logging purposes, and to easily find a client. VtGate propagates it to VtTablet, and VtTablet may use this information for monitoring purposes, to display on dashboards, or for blacklisting purposes.
func (*CallerID) Descriptor ¶
func (*CallerID) GetComponent ¶
func (*CallerID) GetPrincipal ¶
func (*CallerID) GetSubcomponent ¶
func (*CallerID) ProtoMessage ¶
func (*CallerID) ProtoMessage()
func (*CallerID) XXX_DiscardUnknown ¶
func (m *CallerID) XXX_DiscardUnknown()
func (*CallerID) XXX_Marshal ¶
func (*CallerID) XXX_Unmarshal ¶
type Code ¶
type Code int32
Code represents canonical error codes. The names, numbers and comments must match the ones defined by grpc: https://godoc.org/google.golang.org/grpc/codes.
const ( // OK is returned on success. Code_OK Code = 0 // CANCELED indicates the operation was cancelled (typically by the caller). Code_CANCELED Code = 1 // UNKNOWN error. An example of where this error may be returned is // if a Status value received from another address space belongs to // an error-space that is not known in this address space. Also // errors raised by APIs that do not return enough error information // may be converted to this error. Code_UNKNOWN Code = 2 // INVALID_ARGUMENT indicates client specified an invalid argument. // Note that this differs from FAILED_PRECONDITION. It indicates arguments // that are problematic regardless of the state of the system // (e.g., a malformed file name). Code_INVALID_ARGUMENT Code = 3 // DEADLINE_EXCEEDED means operation expired before completion. // For operations that change the state of the system, this error may be // returned even if the operation has completed successfully. For // example, a successful response from a server could have been delayed // long enough for the deadline to expire. Code_DEADLINE_EXCEEDED Code = 4 // NOT_FOUND means some requested entity (e.g., file or directory) was // not found. Code_NOT_FOUND Code = 5 // ALREADY_EXISTS means an attempt to create an entity failed because one // already exists. Code_ALREADY_EXISTS Code = 6 // PERMISSION_DENIED indicates the caller does not have permission to // execute the specified operation. It must not be used for rejections // caused by exhausting some resource (use RESOURCE_EXHAUSTED // instead for those errors). It must not be // used if the caller cannot be identified (use Unauthenticated // instead for those errors). Code_PERMISSION_DENIED Code = 7 // UNAUTHENTICATED indicates the request does not have valid // authentication credentials for the operation. Code_UNAUTHENTICATED Code = 16 // RESOURCE_EXHAUSTED indicates some resource has been exhausted, perhaps // a per-user quota, or perhaps the entire file system is out of space. Code_RESOURCE_EXHAUSTED Code = 8 // FAILED_PRECONDITION indicates operation was rejected because the // system is not in a state required for the operation's execution. // For example, directory to be deleted may be non-empty, an rmdir // operation is applied to a non-directory, etc. // // A litmus test that may help a service implementor in deciding // between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: // (a) Use UNAVAILABLE if the client can retry just the failing call. // (b) Use ABORTED if the client should retry at a higher-level // (e.g., restarting a read-modify-write sequence). // (c) Use FAILED_PRECONDITION if the client should not retry until // the system state has been explicitly fixed. E.g., if an "rmdir" // fails because the directory is non-empty, FAILED_PRECONDITION // should be returned since the client should not retry unless // they have first fixed up the directory by deleting files from it. // (d) Use FAILED_PRECONDITION if the client performs conditional // REST Get/Update/Delete on a resource and the resource on the // server does not match the condition. E.g., conflicting // read-modify-write on the same resource. Code_FAILED_PRECONDITION Code = 9 // ABORTED indicates the operation was aborted, typically due to a // concurrency issue like sequencer check failures, transaction aborts, // etc. // // See litmus test above for deciding between FAILED_PRECONDITION, // ABORTED, and UNAVAILABLE. Code_ABORTED Code = 10 // OUT_OF_RANGE means operation was attempted past the valid range. // E.g., seeking or reading past end of file. // // Unlike INVALID_ARGUMENT, this error indicates a problem that may // be fixed if the system state changes. For example, a 32-bit file // system will generate INVALID_ARGUMENT if asked to read at an // offset that is not in the range [0,2^32-1], but it will generate // OUT_OF_RANGE if asked to read from an offset past the current // file size. // // There is a fair bit of overlap between FAILED_PRECONDITION and // OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific // error) when it applies so that callers who are iterating through // a space can easily look for an OUT_OF_RANGE error to detect when // they are done. Code_OUT_OF_RANGE Code = 11 // UNIMPLEMENTED indicates operation is not implemented or not // supported/enabled in this service. Code_UNIMPLEMENTED Code = 12 // INTERNAL errors. Means some invariants expected by underlying // system has been broken. If you see one of these errors, // something is very broken. Code_INTERNAL Code = 13 // UNAVAILABLE indicates the service is currently unavailable. // This is a most likely a transient condition and may be corrected // by retrying with a backoff. // // See litmus test above for deciding between FAILED_PRECONDITION, // ABORTED, and UNAVAILABLE. Code_UNAVAILABLE Code = 14 // DATA_LOSS indicates unrecoverable data loss or corruption. Code_DATA_LOSS Code = 15 )
func (Code) EnumDescriptor ¶
type EventToken ¶
type EventToken struct { // timestamp is the MySQL timestamp of the statements. Seconds since Epoch. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // The shard name that applied the statements. Note this is not set when // streaming from a vttablet. It is only used on the client -> vtgate link. Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"` // The position on the replication stream after this statement was applied. // It is not the transaction ID / GTID, but the position / GTIDSet. Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EventToken is a structure that describes a point in time in a replication stream on one shard. The most recent known replication position can be retrieved from vttablet when executing a query. It is also sent with the replication streams from the binlog service.
func (*EventToken) Descriptor ¶
func (*EventToken) Descriptor() ([]byte, []int)
func (*EventToken) GetPosition ¶
func (m *EventToken) GetPosition() string
func (*EventToken) GetShard ¶
func (m *EventToken) GetShard() string
func (*EventToken) GetTimestamp ¶
func (m *EventToken) GetTimestamp() int64
func (*EventToken) ProtoMessage ¶
func (*EventToken) ProtoMessage()
func (*EventToken) Reset ¶
func (m *EventToken) Reset()
func (*EventToken) String ¶
func (m *EventToken) String() string
func (*EventToken) XXX_DiscardUnknown ¶
func (m *EventToken) XXX_DiscardUnknown()
func (*EventToken) XXX_Marshal ¶
func (m *EventToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventToken) XXX_Merge ¶
func (m *EventToken) XXX_Merge(src proto.Message)
func (*EventToken) XXX_Size ¶
func (m *EventToken) XXX_Size() int
func (*EventToken) XXX_Unmarshal ¶
func (m *EventToken) XXX_Unmarshal(b []byte) error
type ExecuteOptions ¶
type ExecuteOptions struct { // If set, we will try to include an EventToken with the responses. IncludeEventToken bool `protobuf:"varint,2,opt,name=include_event_token,json=includeEventToken,proto3" json:"include_event_token,omitempty"` // If set, the fresher field may be set as a result comparison to this token. // This is a shortcut so the application doesn't need to care about // comparing EventTokens. CompareEventToken *EventToken `protobuf:"bytes,3,opt,name=compare_event_token,json=compareEventToken,proto3" json:"compare_event_token,omitempty"` // Controls what fields are returned in Field message responses from mysql, i.e. // field name, table name, etc. This is an optimization for high-QPS queries where // the client knows what it's getting IncludedFields ExecuteOptions_IncludedFields `` /* 145-byte string literal not displayed */ // client_rows_found specifies if rows_affected should return // rows found instead of rows affected. Behavior is defined // by MySQL's CLIENT_FOUND_ROWS flag. ClientFoundRows bool `protobuf:"varint,5,opt,name=client_found_rows,json=clientFoundRows,proto3" json:"client_found_rows,omitempty"` // workload specifies the type of workload: // OLTP: DMLs allowed, results have row count limit, and // query timeouts are shorter. // OLAP: DMLS not allowed, no limit on row count, timeouts // can be as high as desired. // DBA: no limit on rowcount or timeout, all queries allowed // but intended for long DMLs and DDLs. Workload ExecuteOptions_Workload `protobuf:"varint,6,opt,name=workload,proto3,enum=query.ExecuteOptions_Workload" json:"workload,omitempty"` // sql_select_limit sets an implicit limit on all select statements. Since // vitess also sets a rowcount limit on queries, the smallest value wins. SqlSelectLimit int64 `protobuf:"varint,8,opt,name=sql_select_limit,json=sqlSelectLimit,proto3" json:"sql_select_limit,omitempty"` TransactionIsolation ExecuteOptions_TransactionIsolation `` /* 169-byte string literal not displayed */ // skip_query_plan_cache specifies if the query plan should be cached by vitess. // By default all query plans are cached. SkipQueryPlanCache bool `protobuf:"varint,10,opt,name=skip_query_plan_cache,json=skipQueryPlanCache,proto3" json:"skip_query_plan_cache,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ExecuteOptions is passed around for all Execute calls.
func (*ExecuteOptions) Descriptor ¶
func (*ExecuteOptions) Descriptor() ([]byte, []int)
func (*ExecuteOptions) GetClientFoundRows ¶
func (m *ExecuteOptions) GetClientFoundRows() bool
func (*ExecuteOptions) GetCompareEventToken ¶
func (m *ExecuteOptions) GetCompareEventToken() *EventToken
func (*ExecuteOptions) GetIncludeEventToken ¶
func (m *ExecuteOptions) GetIncludeEventToken() bool
func (*ExecuteOptions) GetIncludedFields ¶
func (m *ExecuteOptions) GetIncludedFields() ExecuteOptions_IncludedFields
func (*ExecuteOptions) GetSkipQueryPlanCache ¶
func (m *ExecuteOptions) GetSkipQueryPlanCache() bool
func (*ExecuteOptions) GetSqlSelectLimit ¶
func (m *ExecuteOptions) GetSqlSelectLimit() int64
func (*ExecuteOptions) GetTransactionIsolation ¶
func (m *ExecuteOptions) GetTransactionIsolation() ExecuteOptions_TransactionIsolation
func (*ExecuteOptions) GetWorkload ¶
func (m *ExecuteOptions) GetWorkload() ExecuteOptions_Workload
func (*ExecuteOptions) ProtoMessage ¶
func (*ExecuteOptions) ProtoMessage()
func (*ExecuteOptions) Reset ¶
func (m *ExecuteOptions) Reset()
func (*ExecuteOptions) String ¶
func (m *ExecuteOptions) String() string
func (*ExecuteOptions) XXX_DiscardUnknown ¶
func (m *ExecuteOptions) XXX_DiscardUnknown()
func (*ExecuteOptions) XXX_Marshal ¶
func (m *ExecuteOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExecuteOptions) XXX_Merge ¶
func (m *ExecuteOptions) XXX_Merge(src proto.Message)
func (*ExecuteOptions) XXX_Size ¶
func (m *ExecuteOptions) XXX_Size() int
func (*ExecuteOptions) XXX_Unmarshal ¶
func (m *ExecuteOptions) XXX_Unmarshal(b []byte) error
type ExecuteOptions_IncludedFields ¶
type ExecuteOptions_IncludedFields int32
const ( ExecuteOptions_TYPE_AND_NAME ExecuteOptions_IncludedFields = 0 ExecuteOptions_TYPE_ONLY ExecuteOptions_IncludedFields = 1 ExecuteOptions_ALL ExecuteOptions_IncludedFields = 2 )
func (ExecuteOptions_IncludedFields) EnumDescriptor ¶
func (ExecuteOptions_IncludedFields) EnumDescriptor() ([]byte, []int)
func (ExecuteOptions_IncludedFields) String ¶
func (x ExecuteOptions_IncludedFields) String() string
type ExecuteOptions_TransactionIsolation ¶
type ExecuteOptions_TransactionIsolation int32
const ( ExecuteOptions_DEFAULT ExecuteOptions_TransactionIsolation = 0 ExecuteOptions_REPEATABLE_READ ExecuteOptions_TransactionIsolation = 1 ExecuteOptions_READ_COMMITTED ExecuteOptions_TransactionIsolation = 2 ExecuteOptions_READ_UNCOMMITTED ExecuteOptions_TransactionIsolation = 3 ExecuteOptions_SERIALIZABLE ExecuteOptions_TransactionIsolation = 4 // This is not an "official" transaction level but it will do a // START TRANSACTION WITH CONSISTENT SNAPSHOT, READ ONLY ExecuteOptions_CONSISTENT_SNAPSHOT_READ_ONLY ExecuteOptions_TransactionIsolation = 5 // This not an "official" transaction level, it will send queries to mysql // without wrapping them in a transaction ExecuteOptions_AUTOCOMMIT ExecuteOptions_TransactionIsolation = 6 )
func (ExecuteOptions_TransactionIsolation) EnumDescriptor ¶
func (ExecuteOptions_TransactionIsolation) EnumDescriptor() ([]byte, []int)
func (ExecuteOptions_TransactionIsolation) String ¶
func (x ExecuteOptions_TransactionIsolation) String() string
type ExecuteOptions_Workload ¶
type ExecuteOptions_Workload int32
const ( ExecuteOptions_UNSPECIFIED ExecuteOptions_Workload = 0 ExecuteOptions_OLTP ExecuteOptions_Workload = 1 ExecuteOptions_OLAP ExecuteOptions_Workload = 2 ExecuteOptions_DBA ExecuteOptions_Workload = 3 )
func (ExecuteOptions_Workload) EnumDescriptor ¶
func (ExecuteOptions_Workload) EnumDescriptor() ([]byte, []int)
func (ExecuteOptions_Workload) String ¶
func (x ExecuteOptions_Workload) 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,proto3" json:"name,omitempty"` // vitess-defined type. Conversion function is in sqltypes package. Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=query.Type" json:"type,omitempty"` // Remaining fields from mysql C API. // These fields are only populated when ExecuteOptions.included_fields // is set to IncludedFields.ALL. Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` OrgTable string `protobuf:"bytes,4,opt,name=org_table,json=orgTable,proto3" json:"org_table,omitempty"` Database string `protobuf:"bytes,5,opt,name=database,proto3" json:"database,omitempty"` OrgName string `protobuf:"bytes,6,opt,name=org_name,json=orgName,proto3" json:"org_name,omitempty"` // column_length is really a uint32. All 32 bits can be used. ColumnLength uint32 `protobuf:"varint,7,opt,name=column_length,json=columnLength,proto3" json:"column_length,omitempty"` // charset is actually a uint16. Only the lower 16 bits are used. Charset uint32 `protobuf:"varint,8,opt,name=charset,proto3" json:"charset,omitempty"` // decimals is actually a uint8. Only the lower 8 bits are used. Decimals uint32 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` // flags is actually a uint16. Only the lower 16 bits are used. Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Field describes a single column returned by a query
func (*Field) Descriptor ¶
func (*Field) GetCharset ¶
func (*Field) GetColumnLength ¶
func (*Field) GetDatabase ¶
func (*Field) GetDecimals ¶
func (*Field) GetOrgName ¶
func (*Field) GetOrgTable ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) XXX_DiscardUnknown ¶
func (m *Field) XXX_DiscardUnknown()
func (*Field) XXX_Marshal ¶
func (*Field) XXX_Unmarshal ¶
type Flag ¶
type Flag int32
Flag allows us to qualify types by their common properties.
func (Flag) EnumDescriptor ¶
type LegacyErrorCode ¶
type LegacyErrorCode int32
LegacyErrorCode is the enum values for Errors. This type is deprecated. Use Code instead. Background: In the initial design, we thought that we may end up with a different list of canonical error codes than the ones defined by grpc. In hindsight, we realize that the grpc error codes are fairly generic and mostly sufficient. In order to avoid confusion, this type will be deprecated in favor of the new Code that matches exactly what grpc defines. Some names below have a _LEGACY suffix. This is to prevent name collisions with Code.
const ( // SUCCESS_LEGACY is returned from a successful call. LegacyErrorCode_SUCCESS_LEGACY LegacyErrorCode = 0 // CANCELLED_LEGACY means that the context was cancelled (and noticed in the app layer, // as opposed to the RPC layer). LegacyErrorCode_CANCELLED_LEGACY LegacyErrorCode = 1 // UNKNOWN_ERROR_LEGACY includes: // 1. MySQL error codes that we don't explicitly handle. // 2. MySQL response that wasn't as expected. For example, we might expect a MySQL // timestamp to be returned in a particular way, but it wasn't. // 3. Anything else that doesn't fall into a different bucket. LegacyErrorCode_UNKNOWN_ERROR_LEGACY LegacyErrorCode = 2 // BAD_INPUT_LEGACY is returned when an end-user either sends SQL that couldn't be parsed correctly, // or tries a query that isn't supported by Vitess. LegacyErrorCode_BAD_INPUT_LEGACY LegacyErrorCode = 3 // DEADLINE_EXCEEDED_LEGACY is returned when an action is taking longer than a given timeout. LegacyErrorCode_DEADLINE_EXCEEDED_LEGACY LegacyErrorCode = 4 // INTEGRITY_ERROR_LEGACY is returned on integrity error from MySQL, usually due to // duplicate primary keys. LegacyErrorCode_INTEGRITY_ERROR_LEGACY LegacyErrorCode = 5 // PERMISSION_DENIED_LEGACY errors are returned when a user requests access to something // that they don't have permissions for. LegacyErrorCode_PERMISSION_DENIED_LEGACY LegacyErrorCode = 6 // RESOURCE_EXHAUSTED_LEGACY is returned when a query exceeds its quota in some dimension // and can't be completed due to that. Queries that return RESOURCE_EXHAUSTED // should not be retried, as it could be detrimental to the server's health. // Examples of errors that will cause the RESOURCE_EXHAUSTED code: // 1. TxPoolFull: this is retried server-side, and is only returned as an error // if the server-side retries failed. // 2. Query is killed due to it taking too long. LegacyErrorCode_RESOURCE_EXHAUSTED_LEGACY LegacyErrorCode = 7 // QUERY_NOT_SERVED_LEGACY means that a query could not be served right now. // Client can interpret it as: "the tablet that you sent this query to cannot // serve the query right now, try a different tablet or try again later." // This could be due to various reasons: QueryService is not serving, should // not be serving, wrong shard, wrong tablet type, blacklisted table, etc. // Clients that receive this error should usually retry the query, but after taking // the appropriate steps to make sure that the query will get sent to the correct // tablet. LegacyErrorCode_QUERY_NOT_SERVED_LEGACY LegacyErrorCode = 8 // NOT_IN_TX_LEGACY means that we're not currently in a transaction, but we should be. LegacyErrorCode_NOT_IN_TX_LEGACY LegacyErrorCode = 9 // INTERNAL_ERROR_LEGACY means some invariants expected by underlying // system has been broken. If you see one of these errors, // something is very broken. LegacyErrorCode_INTERNAL_ERROR_LEGACY LegacyErrorCode = 10 // TRANSIENT_ERROR_LEGACY is used for when there is some error that we expect we can // recover from automatically - often due to a resource limit temporarily being // reached. Retrying this error, with an exponential backoff, should succeed. // Clients should be able to successfully retry the query on the same backends. // Examples of things that can trigger this error: // 1. Query has been throttled // 2. VtGate could have request backlog LegacyErrorCode_TRANSIENT_ERROR_LEGACY LegacyErrorCode = 11 // UNAUTHENTICATED_LEGACY errors are returned when a user requests access to something, // and we're unable to verify the user's authentication. LegacyErrorCode_UNAUTHENTICATED_LEGACY LegacyErrorCode = 12 )
func (LegacyErrorCode) EnumDescriptor ¶
func (LegacyErrorCode) EnumDescriptor() ([]byte, []int)
func (LegacyErrorCode) String ¶
func (x LegacyErrorCode) String() string
type MySqlFlag ¶
type MySqlFlag int32
Flags sent from the MySQL C API
const ( MySqlFlag_EMPTY MySqlFlag = 0 MySqlFlag_NOT_NULL_FLAG MySqlFlag = 1 MySqlFlag_PRI_KEY_FLAG MySqlFlag = 2 MySqlFlag_UNIQUE_KEY_FLAG MySqlFlag = 4 MySqlFlag_MULTIPLE_KEY_FLAG MySqlFlag = 8 MySqlFlag_BLOB_FLAG MySqlFlag = 16 MySqlFlag_UNSIGNED_FLAG MySqlFlag = 32 MySqlFlag_ZEROFILL_FLAG MySqlFlag = 64 MySqlFlag_BINARY_FLAG MySqlFlag = 128 MySqlFlag_ENUM_FLAG MySqlFlag = 256 MySqlFlag_AUTO_INCREMENT_FLAG MySqlFlag = 512 MySqlFlag_TIMESTAMP_FLAG MySqlFlag = 1024 MySqlFlag_SET_FLAG MySqlFlag = 2048 MySqlFlag_NO_DEFAULT_VALUE_FLAG MySqlFlag = 4096 MySqlFlag_ON_UPDATE_NOW_FLAG MySqlFlag = 8192 MySqlFlag_NUM_FLAG MySqlFlag = 32768 MySqlFlag_PART_KEY_FLAG MySqlFlag = 16384 MySqlFlag_GROUP_FLAG MySqlFlag = 32768 MySqlFlag_UNIQUE_FLAG MySqlFlag = 65536 MySqlFlag_BINCMP_FLAG MySqlFlag = 131072 )
func (MySqlFlag) EnumDescriptor ¶
type QueryResult ¶
type QueryResult struct { Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` RowsAffected uint64 `protobuf:"varint,2,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` InsertId uint64 `protobuf:"varint,3,opt,name=insert_id,json=insertId,proto3" json:"insert_id,omitempty"` Rows []*Row `protobuf:"bytes,4,rep,name=rows,proto3" json:"rows,omitempty"` Extras *ResultExtras `protobuf:"bytes,5,opt,name=extras,proto3" json:"extras,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) GetExtras ¶
func (m *QueryResult) GetExtras() *ResultExtras
func (*QueryResult) GetFields ¶
func (m *QueryResult) GetFields() []*Field
func (*QueryResult) GetInsertId ¶
func (m *QueryResult) GetInsertId() uint64
func (*QueryResult) GetRows ¶
func (m *QueryResult) GetRows() []*Row
func (*QueryResult) GetRowsAffected ¶
func (m *QueryResult) GetRowsAffected() uint64
func (*QueryResult) ProtoMessage ¶
func (*QueryResult) ProtoMessage()
func (*QueryResult) Reset ¶
func (m *QueryResult) Reset()
func (*QueryResult) String ¶
func (m *QueryResult) String() string
func (*QueryResult) XXX_DiscardUnknown ¶
func (m *QueryResult) XXX_DiscardUnknown()
func (*QueryResult) XXX_Marshal ¶
func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryResult) XXX_Merge ¶
func (m *QueryResult) XXX_Merge(src proto.Message)
func (*QueryResult) XXX_Size ¶
func (m *QueryResult) XXX_Size() int
func (*QueryResult) XXX_Unmarshal ¶
func (m *QueryResult) XXX_Unmarshal(b []byte) error
type QueryWarning ¶
type QueryWarning struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
QueryWarning is used to convey out of band query execution warnings by storing in the vtgate.Session
func (*QueryWarning) Descriptor ¶
func (*QueryWarning) Descriptor() ([]byte, []int)
func (*QueryWarning) GetCode ¶
func (m *QueryWarning) GetCode() uint32
func (*QueryWarning) GetMessage ¶
func (m *QueryWarning) GetMessage() string
func (*QueryWarning) ProtoMessage ¶
func (*QueryWarning) ProtoMessage()
func (*QueryWarning) Reset ¶
func (m *QueryWarning) Reset()
func (*QueryWarning) String ¶
func (m *QueryWarning) String() string
func (*QueryWarning) XXX_DiscardUnknown ¶
func (m *QueryWarning) XXX_DiscardUnknown()
func (*QueryWarning) XXX_Marshal ¶
func (m *QueryWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryWarning) XXX_Merge ¶
func (m *QueryWarning) XXX_Merge(src proto.Message)
func (*QueryWarning) XXX_Size ¶
func (m *QueryWarning) XXX_Size() int
func (*QueryWarning) XXX_Unmarshal ¶
func (m *QueryWarning) XXX_Unmarshal(b []byte) error
type RPCError ¶
type RPCError struct { LegacyCode LegacyErrorCode `protobuf:"varint,1,opt,name=legacy_code,json=legacyCode,proto3,enum=query.LegacyErrorCode" json:"legacy_code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Code Code `protobuf:"varint,3,opt,name=code,proto3,enum=query.Code" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
RPCError is an application-level error structure returned by VtTablet (and passed along by VtGate if appropriate). We use this so the clients don't have to parse the error messages, but instead can depend on the value of the code.
func (*RPCError) Descriptor ¶
func (*RPCError) GetLegacyCode ¶
func (m *RPCError) GetLegacyCode() LegacyErrorCode
func (*RPCError) GetMessage ¶
func (*RPCError) ProtoMessage ¶
func (*RPCError) ProtoMessage()
func (*RPCError) XXX_DiscardUnknown ¶
func (m *RPCError) XXX_DiscardUnknown()
func (*RPCError) XXX_Marshal ¶
func (*RPCError) XXX_Unmarshal ¶
type ResultExtras ¶
type ResultExtras struct { // event_token is populated if the include_event_token flag is set // in ExecuteOptions. EventToken *EventToken `protobuf:"bytes,1,opt,name=event_token,json=eventToken,proto3" json:"event_token,omitempty"` // If set, it means the data returned with this result is fresher // than the compare_token passed in the ExecuteOptions. Fresher bool `protobuf:"varint,2,opt,name=fresher,proto3" json:"fresher,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ResultExtras contains optional out-of-band information. Usually the extras are requested by adding ExecuteOptions flags.
func (*ResultExtras) Descriptor ¶
func (*ResultExtras) Descriptor() ([]byte, []int)
func (*ResultExtras) GetEventToken ¶
func (m *ResultExtras) GetEventToken() *EventToken
func (*ResultExtras) GetFresher ¶
func (m *ResultExtras) GetFresher() bool
func (*ResultExtras) ProtoMessage ¶
func (*ResultExtras) ProtoMessage()
func (*ResultExtras) Reset ¶
func (m *ResultExtras) Reset()
func (*ResultExtras) String ¶
func (m *ResultExtras) String() string
func (*ResultExtras) XXX_DiscardUnknown ¶
func (m *ResultExtras) XXX_DiscardUnknown()
func (*ResultExtras) XXX_Marshal ¶
func (m *ResultExtras) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResultExtras) XXX_Merge ¶
func (m *ResultExtras) XXX_Merge(src proto.Message)
func (*ResultExtras) XXX_Size ¶
func (m *ResultExtras) XXX_Size() int
func (*ResultExtras) XXX_Unmarshal ¶
func (m *ResultExtras) XXX_Unmarshal(b []byte) error
type ResultWithError ¶
type ResultWithError struct { // error contains an query level error, only set if result is unset. Error *RPCError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // result contains the query result, only set if error is unset. Result *QueryResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ResultWithError represents a query response in the form of result or error but not both. TODO: To be used in ExecuteBatchResponse and BeginExecuteBatchResponse.
func (*ResultWithError) Descriptor ¶
func (*ResultWithError) Descriptor() ([]byte, []int)
func (*ResultWithError) GetError ¶
func (m *ResultWithError) GetError() *RPCError
func (*ResultWithError) GetResult ¶
func (m *ResultWithError) GetResult() *QueryResult
func (*ResultWithError) ProtoMessage ¶
func (*ResultWithError) ProtoMessage()
func (*ResultWithError) Reset ¶
func (m *ResultWithError) Reset()
func (*ResultWithError) String ¶
func (m *ResultWithError) String() string
func (*ResultWithError) XXX_DiscardUnknown ¶
func (m *ResultWithError) XXX_DiscardUnknown()
func (*ResultWithError) XXX_Marshal ¶
func (m *ResultWithError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResultWithError) XXX_Merge ¶
func (m *ResultWithError) XXX_Merge(src proto.Message)
func (*ResultWithError) XXX_Size ¶
func (m *ResultWithError) XXX_Size() int
func (*ResultWithError) XXX_Unmarshal ¶
func (m *ResultWithError) XXX_Unmarshal(b []byte) error
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,packed,name=lengths,proto3" 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Row is a database row.
func (*Row) Descriptor ¶
func (*Row) GetLengths ¶
func (*Row) ProtoMessage ¶
func (*Row) ProtoMessage()
func (*Row) XXX_DiscardUnknown ¶
func (m *Row) XXX_DiscardUnknown()
func (*Row) XXX_Unmarshal ¶
type StreamEvent ¶
type StreamEvent struct { // The statements in this transaction. Statements []*StreamEvent_Statement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // The Event Token for this event. EventToken *EventToken `protobuf:"bytes,2,opt,name=event_token,json=eventToken,proto3" json:"event_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StreamEvent describes a set of transformations that happened as a single transactional unit on a server. It is streamed back by the Update Stream calls.
func (*StreamEvent) Descriptor ¶
func (*StreamEvent) Descriptor() ([]byte, []int)
func (*StreamEvent) GetEventToken ¶
func (m *StreamEvent) GetEventToken() *EventToken
func (*StreamEvent) GetStatements ¶
func (m *StreamEvent) GetStatements() []*StreamEvent_Statement
func (*StreamEvent) ProtoMessage ¶
func (*StreamEvent) ProtoMessage()
func (*StreamEvent) Reset ¶
func (m *StreamEvent) Reset()
func (*StreamEvent) String ¶
func (m *StreamEvent) String() string
func (*StreamEvent) XXX_DiscardUnknown ¶
func (m *StreamEvent) XXX_DiscardUnknown()
func (*StreamEvent) XXX_Marshal ¶
func (m *StreamEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamEvent) XXX_Merge ¶
func (m *StreamEvent) XXX_Merge(src proto.Message)
func (*StreamEvent) XXX_Size ¶
func (m *StreamEvent) XXX_Size() int
func (*StreamEvent) XXX_Unmarshal ¶
func (m *StreamEvent) XXX_Unmarshal(b []byte) error
type StreamEvent_Statement ¶
type StreamEvent_Statement struct { Category StreamEvent_Statement_Category `protobuf:"varint,1,opt,name=category,proto3,enum=query.StreamEvent_Statement_Category" json:"category,omitempty"` // table_name, primary_key_fields and primary_key_values are set for DML. TableName string `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` PrimaryKeyFields []*Field `protobuf:"bytes,3,rep,name=primary_key_fields,json=primaryKeyFields,proto3" json:"primary_key_fields,omitempty"` PrimaryKeyValues []*Row `protobuf:"bytes,4,rep,name=primary_key_values,json=primaryKeyValues,proto3" json:"primary_key_values,omitempty"` // sql is set for all queries. // FIXME(alainjobart) we may not need it for DMLs. Sql []byte `protobuf:"bytes,5,opt,name=sql,proto3" json:"sql,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
One individual Statement in a transaction.
func (*StreamEvent_Statement) Descriptor ¶
func (*StreamEvent_Statement) Descriptor() ([]byte, []int)
func (*StreamEvent_Statement) GetCategory ¶
func (m *StreamEvent_Statement) GetCategory() StreamEvent_Statement_Category
func (*StreamEvent_Statement) GetPrimaryKeyFields ¶
func (m *StreamEvent_Statement) GetPrimaryKeyFields() []*Field
func (*StreamEvent_Statement) GetPrimaryKeyValues ¶
func (m *StreamEvent_Statement) GetPrimaryKeyValues() []*Row
func (*StreamEvent_Statement) GetSql ¶
func (m *StreamEvent_Statement) GetSql() []byte
func (*StreamEvent_Statement) GetTableName ¶
func (m *StreamEvent_Statement) GetTableName() string
func (*StreamEvent_Statement) ProtoMessage ¶
func (*StreamEvent_Statement) ProtoMessage()
func (*StreamEvent_Statement) Reset ¶
func (m *StreamEvent_Statement) Reset()
func (*StreamEvent_Statement) String ¶
func (m *StreamEvent_Statement) String() string
func (*StreamEvent_Statement) XXX_DiscardUnknown ¶
func (m *StreamEvent_Statement) XXX_DiscardUnknown()
func (*StreamEvent_Statement) XXX_Marshal ¶
func (m *StreamEvent_Statement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamEvent_Statement) XXX_Merge ¶
func (m *StreamEvent_Statement) XXX_Merge(src proto.Message)
func (*StreamEvent_Statement) XXX_Size ¶
func (m *StreamEvent_Statement) XXX_Size() int
func (*StreamEvent_Statement) XXX_Unmarshal ¶
func (m *StreamEvent_Statement) XXX_Unmarshal(b []byte) error
type StreamEvent_Statement_Category ¶
type StreamEvent_Statement_Category int32
The category of one statement.
const ( StreamEvent_Statement_Error StreamEvent_Statement_Category = 0 StreamEvent_Statement_DML StreamEvent_Statement_Category = 1 StreamEvent_Statement_DDL StreamEvent_Statement_Category = 2 )
func (StreamEvent_Statement_Category) EnumDescriptor ¶
func (StreamEvent_Statement_Category) EnumDescriptor() ([]byte, []int)
func (StreamEvent_Statement_Category) String ¶
func (x StreamEvent_Statement_Category) String() string
type Target ¶
type Target struct { Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"` // cell is used for routing queries between vtgate and vttablets. It // is not used when Target is part of the Session sent by the client. Cell string `protobuf:"bytes,3,opt,name=cell,proto3" json:"cell,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Target describes what the client expects the tablet is. If the tablet does not match, an error is returned.
func (*Target) Descriptor ¶
func (*Target) GetKeyspace ¶
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) XXX_DiscardUnknown ¶
func (m *Target) XXX_DiscardUnknown()
func (*Target) XXX_Marshal ¶
func (*Target) XXX_Unmarshal ¶
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 tuple. This cannot // be returned in a QueryResult, but it can // be sent as a bind var. // Properties: 28, None. Type_TUPLE Type = 28 // GEOMETRY specifies a GEOMETRY type. // Properties: 29, IsQuoted. Type_GEOMETRY Type = 2077 // JSON specifies a JSON type. // Properties: 30, IsQuoted. Type_JSON Type = 2078 // EXPRESSION specifies a SQL expression. // This type is for internal use only. // Properties: 31, None. Type_EXPRESSION Type = 31 )
func (Type) EnumDescriptor ¶
type VTGateCallerID ¶
type VTGateCallerID struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Groups []string `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) GetGroups ¶
func (m *VTGateCallerID) GetGroups() []string
func (*VTGateCallerID) GetUsername ¶
func (m *VTGateCallerID) GetUsername() string
func (*VTGateCallerID) ProtoMessage ¶
func (*VTGateCallerID) ProtoMessage()
func (*VTGateCallerID) Reset ¶
func (m *VTGateCallerID) Reset()
func (*VTGateCallerID) String ¶
func (m *VTGateCallerID) String() string
func (*VTGateCallerID) XXX_DiscardUnknown ¶
func (m *VTGateCallerID) XXX_DiscardUnknown()
func (*VTGateCallerID) XXX_Marshal ¶
func (m *VTGateCallerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VTGateCallerID) XXX_Merge ¶
func (m *VTGateCallerID) XXX_Merge(src proto.Message)
func (*VTGateCallerID) XXX_Size ¶
func (m *VTGateCallerID) XXX_Size() int
func (*VTGateCallerID) XXX_Unmarshal ¶
func (m *VTGateCallerID) XXX_Unmarshal(b []byte) error
type Value ¶
type Value struct { Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=query.Type" json:"type,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Value represents a typed value.
func (*Value) Descriptor ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) XXX_DiscardUnknown ¶
func (m *Value) XXX_DiscardUnknown()