vtgate

package
v0.0.13-beta27 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommitOrder_name = map[int32]string{
	0: "NORMAL",
	1: "PRE",
	2: "POST",
	3: "AUTOCOMMIT",
}
View Source
var CommitOrder_value = map[string]int32{
	"NORMAL":     0,
	"PRE":        1,
	"POST":       2,
	"AUTOCOMMIT": 3,
}
View Source
var TransactionMode_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "SINGLE",
	2: "MULTI",
	3: "TWOPC",
}
View Source
var TransactionMode_value = map[string]int32{
	"UNSPECIFIED": 0,
	"SINGLE":      1,
	"MULTI":       2,
	"TWOPC":       3,
}

Functions

This section is empty.

Types

type CommitOrder

type CommitOrder int32

CommitOrder is used to designate which of the ShardSessions get used for transactions.

const (
	// NORMAL is the default commit order.
	CommitOrder_NORMAL CommitOrder = 0
	// PRE is used to designate pre_sessions.
	CommitOrder_PRE CommitOrder = 1
	// POST is used to designate post_sessions.
	CommitOrder_POST CommitOrder = 2
	// AUTOCOMMIT is used to run the statement as autocommitted transaction.
	CommitOrder_AUTOCOMMIT CommitOrder = 3
)

func (CommitOrder) EnumDescriptor

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

func (CommitOrder) String

func (x CommitOrder) String() string

type ExecuteBatchRequest

type ExecuteBatchRequest struct {
	// caller_id identifies the caller. This is the effective caller ID,
	// set by the application to further identify the caller.
	CallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=caller_id,json=callerId,proto3" json:"caller_id,omitempty"`
	// session carries the session state.
	Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	// queries is a list of query and bind variables to execute.
	Queries []*query.BoundQuery `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"`
	// These values are deprecated. Use session instead.
	// TODO(sougou): remove in 3.1
	TabletType           topodata.TabletType   `protobuf:"varint,4,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	AsTransaction        bool                  `protobuf:"varint,5,opt,name=as_transaction,json=asTransaction,proto3" json:"as_transaction,omitempty"`
	KeyspaceShard        string                `protobuf:"bytes,6,opt,name=keyspace_shard,json=keyspaceShard,proto3" json:"keyspace_shard,omitempty"`
	Options              *query.ExecuteOptions `protobuf:"bytes,7,opt,name=options,proto3" json:"options,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

ExecuteBatchRequest is the payload to ExecuteBatch.

func (*ExecuteBatchRequest) Descriptor

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

func (*ExecuteBatchRequest) GetAsTransaction

func (m *ExecuteBatchRequest) GetAsTransaction() bool

func (*ExecuteBatchRequest) GetCallerId

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

func (*ExecuteBatchRequest) GetKeyspaceShard

func (m *ExecuteBatchRequest) GetKeyspaceShard() string

func (*ExecuteBatchRequest) GetOptions

func (m *ExecuteBatchRequest) GetOptions() *query.ExecuteOptions

func (*ExecuteBatchRequest) GetQueries

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

func (*ExecuteBatchRequest) GetSession

func (m *ExecuteBatchRequest) GetSession() *Session

func (*ExecuteBatchRequest) GetTabletType

func (m *ExecuteBatchRequest) GetTabletType() topodata.TabletType

func (*ExecuteBatchRequest) ProtoMessage

func (*ExecuteBatchRequest) ProtoMessage()

func (*ExecuteBatchRequest) Reset

func (m *ExecuteBatchRequest) Reset()

func (*ExecuteBatchRequest) String

func (m *ExecuteBatchRequest) String() string

func (*ExecuteBatchRequest) XXX_DiscardUnknown

func (m *ExecuteBatchRequest) XXX_DiscardUnknown()

func (*ExecuteBatchRequest) XXX_Marshal

func (m *ExecuteBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteBatchRequest) XXX_Merge

func (m *ExecuteBatchRequest) XXX_Merge(src proto.Message)

func (*ExecuteBatchRequest) XXX_Size

func (m *ExecuteBatchRequest) XXX_Size() int

func (*ExecuteBatchRequest) XXX_Unmarshal

func (m *ExecuteBatchRequest) XXX_Unmarshal(b []byte) error

type ExecuteBatchResponse

type ExecuteBatchResponse struct {
	// error contains an application level error if necessary. Note the
	// session may have changed, even when an error is returned (for
	// instance if a database integrity error happened).
	Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// session is the updated session information.
	Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	// results contains the query results, only set if application level error is unset.
	Results              []*query.ResultWithError `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

ExecuteBatchResponse is the returned value from ExecuteBatch.

func (*ExecuteBatchResponse) Descriptor

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

func (*ExecuteBatchResponse) GetError

func (m *ExecuteBatchResponse) GetError() *vtrpc.RPCError

func (*ExecuteBatchResponse) GetResults

func (m *ExecuteBatchResponse) GetResults() []*query.ResultWithError

func (*ExecuteBatchResponse) GetSession

func (m *ExecuteBatchResponse) GetSession() *Session

func (*ExecuteBatchResponse) ProtoMessage

func (*ExecuteBatchResponse) ProtoMessage()

func (*ExecuteBatchResponse) Reset

func (m *ExecuteBatchResponse) Reset()

func (*ExecuteBatchResponse) String

func (m *ExecuteBatchResponse) String() string

func (*ExecuteBatchResponse) XXX_DiscardUnknown

func (m *ExecuteBatchResponse) XXX_DiscardUnknown()

func (*ExecuteBatchResponse) XXX_Marshal

func (m *ExecuteBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteBatchResponse) XXX_Merge

func (m *ExecuteBatchResponse) XXX_Merge(src proto.Message)

func (*ExecuteBatchResponse) XXX_Size

func (m *ExecuteBatchResponse) XXX_Size() int

func (*ExecuteBatchResponse) XXX_Unmarshal

func (m *ExecuteBatchResponse) XXX_Unmarshal(b []byte) error

type ExecuteRequest

type ExecuteRequest struct {
	// caller_id identifies the caller. This is the effective caller ID,
	// set by the application to further identify the caller.
	CallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=caller_id,json=callerId,proto3" json:"caller_id,omitempty"`
	// session carries the session state.
	Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	// query is the query and bind variables to execute.
	Query *query.BoundQuery `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
	// These values are deprecated. Use session instead.
	// TODO(sougou): remove in 3.1
	TabletType           topodata.TabletType   `protobuf:"varint,4,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	KeyspaceShard        string                `protobuf:"bytes,6,opt,name=keyspace_shard,json=keyspaceShard,proto3" json:"keyspace_shard,omitempty"`
	Options              *query.ExecuteOptions `protobuf:"bytes,7,opt,name=options,proto3" json:"options,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

ExecuteRequest is the payload to Execute.

func (*ExecuteRequest) Descriptor

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

func (*ExecuteRequest) GetCallerId

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

func (*ExecuteRequest) GetKeyspaceShard

func (m *ExecuteRequest) GetKeyspaceShard() string

func (*ExecuteRequest) GetOptions

func (m *ExecuteRequest) GetOptions() *query.ExecuteOptions

func (*ExecuteRequest) GetQuery

func (m *ExecuteRequest) GetQuery() *query.BoundQuery

func (*ExecuteRequest) GetSession

func (m *ExecuteRequest) GetSession() *Session

func (*ExecuteRequest) GetTabletType

func (m *ExecuteRequest) GetTabletType() topodata.TabletType

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) Reset

func (m *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (m *ExecuteRequest) String() string

func (*ExecuteRequest) XXX_DiscardUnknown

func (m *ExecuteRequest) XXX_DiscardUnknown()

func (*ExecuteRequest) XXX_Marshal

func (m *ExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteRequest) XXX_Merge

func (m *ExecuteRequest) XXX_Merge(src proto.Message)

func (*ExecuteRequest) XXX_Size

func (m *ExecuteRequest) XXX_Size() int

func (*ExecuteRequest) XXX_Unmarshal

func (m *ExecuteRequest) XXX_Unmarshal(b []byte) error

type ExecuteResponse

type ExecuteResponse struct {
	// error contains an application level error if necessary. Note the
	// session may have changed, even when an error is returned (for
	// instance if a database integrity error happened).
	Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// session is the updated session information.
	Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	// result contains the query result, only set if error is unset.
	Result               *query.QueryResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

ExecuteResponse is the returned value from Execute.

func (*ExecuteResponse) Descriptor

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

func (*ExecuteResponse) GetError

func (m *ExecuteResponse) GetError() *vtrpc.RPCError

func (*ExecuteResponse) GetResult

func (m *ExecuteResponse) GetResult() *query.QueryResult

func (*ExecuteResponse) GetSession

func (m *ExecuteResponse) GetSession() *Session

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) Reset

func (m *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (m *ExecuteResponse) String() string

func (*ExecuteResponse) XXX_DiscardUnknown

func (m *ExecuteResponse) XXX_DiscardUnknown()

func (*ExecuteResponse) XXX_Marshal

func (m *ExecuteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteResponse) XXX_Merge

func (m *ExecuteResponse) XXX_Merge(src proto.Message)

func (*ExecuteResponse) XXX_Size

func (m *ExecuteResponse) XXX_Size() int

func (*ExecuteResponse) XXX_Unmarshal

func (m *ExecuteResponse) XXX_Unmarshal(b []byte) error

type ResolveTransactionRequest

type ResolveTransactionRequest struct {
	// caller_id identifies the caller. This is the effective caller ID,
	// set by the application to further identify the caller.
	CallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=caller_id,json=callerId,proto3" json:"caller_id,omitempty"`
	// dtid is the dtid of the transaction to be resolved.
	Dtid                 string   `protobuf:"bytes,2,opt,name=dtid,proto3" json:"dtid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ResolveTransactionRequest is the payload to ResolveTransaction.

func (*ResolveTransactionRequest) Descriptor

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

func (*ResolveTransactionRequest) GetCallerId

func (m *ResolveTransactionRequest) GetCallerId() *vtrpc.CallerID

func (*ResolveTransactionRequest) GetDtid

func (m *ResolveTransactionRequest) GetDtid() string

func (*ResolveTransactionRequest) ProtoMessage

func (*ResolveTransactionRequest) ProtoMessage()

func (*ResolveTransactionRequest) Reset

func (m *ResolveTransactionRequest) Reset()

func (*ResolveTransactionRequest) String

func (m *ResolveTransactionRequest) String() string

func (*ResolveTransactionRequest) XXX_DiscardUnknown

func (m *ResolveTransactionRequest) XXX_DiscardUnknown()

func (*ResolveTransactionRequest) XXX_Marshal

func (m *ResolveTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResolveTransactionRequest) XXX_Merge

func (m *ResolveTransactionRequest) XXX_Merge(src proto.Message)

func (*ResolveTransactionRequest) XXX_Size

func (m *ResolveTransactionRequest) XXX_Size() int

func (*ResolveTransactionRequest) XXX_Unmarshal

func (m *ResolveTransactionRequest) XXX_Unmarshal(b []byte) error

type ResolveTransactionResponse

type ResolveTransactionResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ResolveTransactionResponse is the returned value from Rollback.

func (*ResolveTransactionResponse) Descriptor

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

func (*ResolveTransactionResponse) ProtoMessage

func (*ResolveTransactionResponse) ProtoMessage()

func (*ResolveTransactionResponse) Reset

func (m *ResolveTransactionResponse) Reset()

func (*ResolveTransactionResponse) String

func (m *ResolveTransactionResponse) String() string

func (*ResolveTransactionResponse) XXX_DiscardUnknown

func (m *ResolveTransactionResponse) XXX_DiscardUnknown()

func (*ResolveTransactionResponse) XXX_Marshal

func (m *ResolveTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResolveTransactionResponse) XXX_Merge

func (m *ResolveTransactionResponse) XXX_Merge(src proto.Message)

func (*ResolveTransactionResponse) XXX_Size

func (m *ResolveTransactionResponse) XXX_Size() int

func (*ResolveTransactionResponse) XXX_Unmarshal

func (m *ResolveTransactionResponse) XXX_Unmarshal(b []byte) error

type Session

type Session struct {
	// in_transaction is set to true if the session is in a transaction.
	InTransaction bool `protobuf:"varint,1,opt,name=in_transaction,json=inTransaction,proto3" json:"in_transaction,omitempty"`
	// shard_sessions keep track of per-shard transaction info.
	ShardSessions []*Session_ShardSession `protobuf:"bytes,2,rep,name=shard_sessions,json=shardSessions,proto3" json:"shard_sessions,omitempty"`
	// autocommit specifies if the session is in autocommit mode.
	// This is used only for V3.
	Autocommit bool `protobuf:"varint,4,opt,name=autocommit,proto3" json:"autocommit,omitempty"`
	// target_string is the target expressed as a string. Valid
	// names are: keyspace:shard@target, keyspace@target or @target.
	// This is used only for V3.
	TargetString string `protobuf:"bytes,5,opt,name=target_string,json=targetString,proto3" json:"target_string,omitempty"`
	// options is used only for V3.
	Options *query.ExecuteOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
	// transaction_mode specifies the current transaction mode.
	TransactionMode TransactionMode `` /* 135-byte string literal not displayed */
	// warnings contains non-fatal warnings from the previous query
	Warnings []*query.QueryWarning `protobuf:"bytes,8,rep,name=warnings,proto3" json:"warnings,omitempty"`
	// pre_sessions contains sessions that have to be committed first.
	PreSessions []*Session_ShardSession `protobuf:"bytes,9,rep,name=pre_sessions,json=preSessions,proto3" json:"pre_sessions,omitempty"`
	// post_sessions contains sessions that have to be committed last.
	PostSessions []*Session_ShardSession `protobuf:"bytes,10,rep,name=post_sessions,json=postSessions,proto3" json:"post_sessions,omitempty"`
	// last_insert_id keeps track of the last seen insert_id for this session
	LastInsertId uint64 `protobuf:"varint,11,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"`
	// found_rows keeps track of how many rows the last query returned
	FoundRows uint64 `protobuf:"varint,12,opt,name=found_rows,json=foundRows,proto3" json:"found_rows,omitempty"`
	// user_defined_variables contains all the @variables defined for this session
	UserDefinedVariables map[string]*query.BindVariable `` /* 212-byte string literal not displayed */
	// system_variables keeps track of all session variables set for this connection
	// TODO: systay should we keep this so we can apply it ordered?
	SystemVariables map[string]string `` /* 195-byte string literal not displayed */
	// row_count keeps track of the last seen rows affected for this session
	RowCount             int64    `protobuf:"varint,15,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Session objects are exchanged like cookies through various calls to VTGate. The behavior differs between V2 & V3 APIs. V3 APIs are Execute, ExecuteBatch and StreamExecute. All other APIs are V2. For the V3 APIs, the session must be sent with every call to Execute or ExecuteBatch. For the V2 APIs, Begin does not accept a session. It instead returns a brand new one with in_transaction set to true. After a call to Commit or Rollback, the session can be discarded. If you're not in a transaction, Session is an optional parameter for the V2 APIs.

func (*Session) Descriptor

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

func (*Session) GetAutocommit

func (m *Session) GetAutocommit() bool

func (*Session) GetFoundRows

func (m *Session) GetFoundRows() uint64

func (*Session) GetInTransaction

func (m *Session) GetInTransaction() bool

func (*Session) GetLastInsertId

func (m *Session) GetLastInsertId() uint64

func (*Session) GetOptions

func (m *Session) GetOptions() *query.ExecuteOptions

func (*Session) GetPostSessions

func (m *Session) GetPostSessions() []*Session_ShardSession

func (*Session) GetPreSessions

func (m *Session) GetPreSessions() []*Session_ShardSession

func (*Session) GetRowCount

func (m *Session) GetRowCount() int64

func (*Session) GetShardSessions

func (m *Session) GetShardSessions() []*Session_ShardSession

func (*Session) GetSystemVariables

func (m *Session) GetSystemVariables() map[string]string

func (*Session) GetTargetString

func (m *Session) GetTargetString() string

func (*Session) GetTransactionMode

func (m *Session) GetTransactionMode() TransactionMode

func (*Session) GetUserDefinedVariables

func (m *Session) GetUserDefinedVariables() map[string]*query.BindVariable

func (*Session) GetWarnings

func (m *Session) GetWarnings() []*query.QueryWarning

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) Reset

func (m *Session) Reset()

func (*Session) String

func (m *Session) String() string

func (*Session) XXX_DiscardUnknown

func (m *Session) XXX_DiscardUnknown()

func (*Session) XXX_Marshal

func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Session) XXX_Merge

func (m *Session) XXX_Merge(src proto.Message)

func (*Session) XXX_Size

func (m *Session) XXX_Size() int

func (*Session) XXX_Unmarshal

func (m *Session) XXX_Unmarshal(b []byte) error

type Session_ShardSession

type Session_ShardSession struct {
	Target        *query.Target         `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	TransactionId int64                 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	TabletAlias   *topodata.TabletAlias `protobuf:"bytes,3,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"`
	// reserved connection if a dedicated connection is needed
	ReservedId           int64    `protobuf:"varint,4,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Session_ShardSession) Descriptor

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

func (*Session_ShardSession) GetReservedId

func (m *Session_ShardSession) GetReservedId() int64

func (*Session_ShardSession) GetTabletAlias

func (m *Session_ShardSession) GetTabletAlias() *topodata.TabletAlias

func (*Session_ShardSession) GetTarget

func (m *Session_ShardSession) GetTarget() *query.Target

func (*Session_ShardSession) GetTransactionId

func (m *Session_ShardSession) GetTransactionId() int64

func (*Session_ShardSession) ProtoMessage

func (*Session_ShardSession) ProtoMessage()

func (*Session_ShardSession) Reset

func (m *Session_ShardSession) Reset()

func (*Session_ShardSession) String

func (m *Session_ShardSession) String() string

func (*Session_ShardSession) XXX_DiscardUnknown

func (m *Session_ShardSession) XXX_DiscardUnknown()

func (*Session_ShardSession) XXX_Marshal

func (m *Session_ShardSession) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Session_ShardSession) XXX_Merge

func (m *Session_ShardSession) XXX_Merge(src proto.Message)

func (*Session_ShardSession) XXX_Size

func (m *Session_ShardSession) XXX_Size() int

func (*Session_ShardSession) XXX_Unmarshal

func (m *Session_ShardSession) XXX_Unmarshal(b []byte) error

type StreamExecuteRequest

type StreamExecuteRequest struct {
	// caller_id identifies the caller. This is the effective caller ID,
	// set by the application to further identify the caller.
	CallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=caller_id,json=callerId,proto3" json:"caller_id,omitempty"`
	// query is the query and bind variables to execute.
	Query *query.BoundQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// These values are deprecated. Use session instead.
	// TODO(sougou): remove in 3.1
	TabletType    topodata.TabletType   `protobuf:"varint,3,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	KeyspaceShard string                `protobuf:"bytes,4,opt,name=keyspace_shard,json=keyspaceShard,proto3" json:"keyspace_shard,omitempty"`
	Options       *query.ExecuteOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
	// session carries the session state.
	Session              *Session `protobuf:"bytes,6,opt,name=session,proto3" json:"session,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

StreamExecuteRequest is the payload to StreamExecute.

func (*StreamExecuteRequest) Descriptor

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

func (*StreamExecuteRequest) GetCallerId

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

func (*StreamExecuteRequest) GetKeyspaceShard

func (m *StreamExecuteRequest) GetKeyspaceShard() string

func (*StreamExecuteRequest) GetOptions

func (m *StreamExecuteRequest) GetOptions() *query.ExecuteOptions

func (*StreamExecuteRequest) GetQuery

func (m *StreamExecuteRequest) GetQuery() *query.BoundQuery

func (*StreamExecuteRequest) GetSession

func (m *StreamExecuteRequest) GetSession() *Session

func (*StreamExecuteRequest) GetTabletType

func (m *StreamExecuteRequest) GetTabletType() topodata.TabletType

func (*StreamExecuteRequest) ProtoMessage

func (*StreamExecuteRequest) ProtoMessage()

func (*StreamExecuteRequest) Reset

func (m *StreamExecuteRequest) Reset()

func (*StreamExecuteRequest) String

func (m *StreamExecuteRequest) String() string

func (*StreamExecuteRequest) XXX_DiscardUnknown

func (m *StreamExecuteRequest) XXX_DiscardUnknown()

func (*StreamExecuteRequest) XXX_Marshal

func (m *StreamExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamExecuteRequest) XXX_Merge

func (m *StreamExecuteRequest) XXX_Merge(src proto.Message)

func (*StreamExecuteRequest) XXX_Size

func (m *StreamExecuteRequest) XXX_Size() int

func (*StreamExecuteRequest) XXX_Unmarshal

func (m *StreamExecuteRequest) XXX_Unmarshal(b []byte) error

type StreamExecuteResponse

type StreamExecuteResponse struct {
	// result contains the result data.
	// The first value contains only Fields information.
	// The next values contain the actual rows, a few values per result.
	Result               *query.QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

StreamExecuteResponse is the returned value from StreamExecute. The session is currently not returned because StreamExecute is not expected to modify it.

func (*StreamExecuteResponse) Descriptor

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

func (*StreamExecuteResponse) GetResult

func (m *StreamExecuteResponse) GetResult() *query.QueryResult

func (*StreamExecuteResponse) ProtoMessage

func (*StreamExecuteResponse) ProtoMessage()

func (*StreamExecuteResponse) Reset

func (m *StreamExecuteResponse) Reset()

func (*StreamExecuteResponse) String

func (m *StreamExecuteResponse) String() string

func (*StreamExecuteResponse) XXX_DiscardUnknown

func (m *StreamExecuteResponse) XXX_DiscardUnknown()

func (*StreamExecuteResponse) XXX_Marshal

func (m *StreamExecuteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamExecuteResponse) XXX_Merge

func (m *StreamExecuteResponse) XXX_Merge(src proto.Message)

func (*StreamExecuteResponse) XXX_Size

func (m *StreamExecuteResponse) XXX_Size() int

func (*StreamExecuteResponse) XXX_Unmarshal

func (m *StreamExecuteResponse) XXX_Unmarshal(b []byte) error

type TransactionMode

type TransactionMode int32

TransactionMode controls the execution of distributed transaction across multiple shards.

const (
	// UNSPECIFIED uses the transaction mode set by the VTGate flag 'transaction_mode'.
	TransactionMode_UNSPECIFIED TransactionMode = 0
	// SINGLE disallows distributed transactions.
	TransactionMode_SINGLE TransactionMode = 1
	// MULTI allows distributed transactions with best effort commit.
	TransactionMode_MULTI TransactionMode = 2
	// TWOPC is for distributed transactions with atomic commits.
	TransactionMode_TWOPC TransactionMode = 3
)

func (TransactionMode) EnumDescriptor

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

func (TransactionMode) String

func (x TransactionMode) String() string

type VStreamRequest

type VStreamRequest struct {
	CallerId   *vtrpc.CallerID     `protobuf:"bytes,1,opt,name=caller_id,json=callerId,proto3" json:"caller_id,omitempty"`
	TabletType topodata.TabletType `protobuf:"varint,2,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	// position specifies the starting point of the bin log positions
	// as well as the keyspace-shards to pull events from.
	// position is of the form 'ks1:0@MySQL56/<mysql_pos>|ks2:-80@MySQL56/<mysql_pos>'.
	Vgtid                *binlogdata.VGtid  `protobuf:"bytes,3,opt,name=vgtid,proto3" json:"vgtid,omitempty"`
	Filter               *binlogdata.Filter `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

VStreamRequest is the payload for VStream.

func (*VStreamRequest) Descriptor

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

func (*VStreamRequest) GetCallerId

func (m *VStreamRequest) GetCallerId() *vtrpc.CallerID

func (*VStreamRequest) GetFilter

func (m *VStreamRequest) GetFilter() *binlogdata.Filter

func (*VStreamRequest) GetTabletType

func (m *VStreamRequest) GetTabletType() topodata.TabletType

func (*VStreamRequest) GetVgtid

func (m *VStreamRequest) GetVgtid() *binlogdata.VGtid

func (*VStreamRequest) ProtoMessage

func (*VStreamRequest) ProtoMessage()

func (*VStreamRequest) Reset

func (m *VStreamRequest) Reset()

func (*VStreamRequest) String

func (m *VStreamRequest) String() string

func (*VStreamRequest) XXX_DiscardUnknown

func (m *VStreamRequest) XXX_DiscardUnknown()

func (*VStreamRequest) XXX_Marshal

func (m *VStreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VStreamRequest) XXX_Merge

func (m *VStreamRequest) XXX_Merge(src proto.Message)

func (*VStreamRequest) XXX_Size

func (m *VStreamRequest) XXX_Size() int

func (*VStreamRequest) XXX_Unmarshal

func (m *VStreamRequest) XXX_Unmarshal(b []byte) error

type VStreamResponse

type VStreamResponse struct {
	Events               []*binlogdata.VEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

VStreamResponse is streamed by VStream.

func (*VStreamResponse) Descriptor

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

func (*VStreamResponse) GetEvents

func (m *VStreamResponse) GetEvents() []*binlogdata.VEvent

func (*VStreamResponse) ProtoMessage

func (*VStreamResponse) ProtoMessage()

func (*VStreamResponse) Reset

func (m *VStreamResponse) Reset()

func (*VStreamResponse) String

func (m *VStreamResponse) String() string

func (*VStreamResponse) XXX_DiscardUnknown

func (m *VStreamResponse) XXX_DiscardUnknown()

func (*VStreamResponse) XXX_Marshal

func (m *VStreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VStreamResponse) XXX_Merge

func (m *VStreamResponse) XXX_Merge(src proto.Message)

func (*VStreamResponse) XXX_Size

func (m *VStreamResponse) XXX_Size() int

func (*VStreamResponse) XXX_Unmarshal

func (m *VStreamResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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