octosql: github.com/cube2222/octosql/parser/sqlparser/dependency/query Index | Files

package query

import "github.com/cube2222/octosql/parser/sqlparser/dependency/query"

Package query is a generated protocol buffer package.

It is generated from these files:

query.proto

It has these top-level messages:

Target
VTGateCallerID
EventToken
Value
BindVariable
BoundQuery
ExecuteOptions
Field
Row
ResultExtras
QueryResult
StreamEvent
ExecuteRequest
ExecuteResponse
ResultWithError
ExecuteBatchRequest
ExecuteBatchResponse
StreamExecuteRequest
StreamExecuteResponse
BeginRequest
BeginResponse
CommitRequest
CommitResponse
RollbackRequest
RollbackResponse
PrepareRequest
PrepareResponse
CommitPreparedRequest
CommitPreparedResponse
RollbackPreparedRequest
RollbackPreparedResponse
CreateTransactionRequest
CreateTransactionResponse
StartCommitRequest
StartCommitResponse
SetRollbackRequest
SetRollbackResponse
ConcludeTransactionRequest
ConcludeTransactionResponse
ReadTransactionRequest
ReadTransactionResponse
BeginExecuteRequest
BeginExecuteResponse
BeginExecuteBatchRequest
BeginExecuteBatchResponse
MessageStreamRequest
MessageStreamResponse
MessageAckRequest
MessageAckResponse
SplitQueryRequest
QuerySplit
SplitQueryResponse
StreamHealthRequest
RealtimeStats
StreamHealthResponse
UpdateStreamRequest
UpdateStreamResponse
TransactionMetadata

Index

Package Files

query.pb.go

Variables

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 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 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 SplitQueryRequest_Algorithm_name = map[int32]string{
    0:  "EQUAL_SPLITS",
    1:  "FULL_SCAN",
}
var SplitQueryRequest_Algorithm_value = map[string]int32{
    "EQUAL_SPLITS": 0,
    "FULL_SCAN":    1,
}
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 TransactionState_name = map[int32]string{
    0:  "UNKNOWN",
    1:  "PREPARE",
    2:  "COMMIT",
    3:  "ROLLBACK",
}
var TransactionState_value = map[string]int32{
    "UNKNOWN":  0,
    "PREPARE":  1,
    "COMMIT":   2,
    "ROLLBACK": 3,
}
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",
}
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,
}

type BindVariable Uses

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 Uses

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

func (*BindVariable) GetType Uses

func (m *BindVariable) GetType() Type

func (*BindVariable) GetValue Uses

func (m *BindVariable) GetValue() []byte

func (*BindVariable) GetValues Uses

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

func (*BindVariable) ProtoMessage Uses

func (*BindVariable) ProtoMessage()

func (*BindVariable) Reset Uses

func (m *BindVariable) Reset()

func (*BindVariable) String Uses

func (m *BindVariable) String() string

type BoundQuery Uses

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 `protobuf:"bytes,2,rep,name=bind_variables,json=bindVariables" json:"bind_variables,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

BoundQuery is a query with its bind variables

func (*BoundQuery) Descriptor Uses

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

func (*BoundQuery) GetBindVariables Uses

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

func (*BoundQuery) GetSql Uses

func (m *BoundQuery) GetSql() string

func (*BoundQuery) ProtoMessage Uses

func (*BoundQuery) ProtoMessage()

func (*BoundQuery) Reset Uses

func (m *BoundQuery) Reset()

func (*BoundQuery) String Uses

func (m *BoundQuery) String() string

type EventToken Uses

type EventToken struct {
    // timestamp is the MySQL timestamp of the statements. Seconds since Epoch.
    Timestamp int64 `protobuf:"varint,1,opt,name=timestamp" 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" 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" json:"position,omitempty"`
}

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 Uses

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

func (*EventToken) GetPosition Uses

func (m *EventToken) GetPosition() string

func (*EventToken) GetShard Uses

func (m *EventToken) GetShard() string

func (*EventToken) GetTimestamp Uses

func (m *EventToken) GetTimestamp() int64

func (*EventToken) ProtoMessage Uses

func (*EventToken) ProtoMessage()

func (*EventToken) Reset Uses

func (m *EventToken) Reset()

func (*EventToken) String Uses

func (m *EventToken) String() string

type ExecuteOptions Uses

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" 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" 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 `protobuf:"varint,4,opt,name=included_fields,json=includedFields,enum=query.ExecuteOptions_IncludedFields" json:"included_fields,omitempty"`
}

ExecuteOptions is passed around for all Execute calls.

func (*ExecuteOptions) Descriptor Uses

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

func (*ExecuteOptions) GetCompareEventToken Uses

func (m *ExecuteOptions) GetCompareEventToken() *EventToken

func (*ExecuteOptions) GetIncludeEventToken Uses

func (m *ExecuteOptions) GetIncludeEventToken() bool

func (*ExecuteOptions) GetIncludedFields Uses

func (m *ExecuteOptions) GetIncludedFields() ExecuteOptions_IncludedFields

func (*ExecuteOptions) ProtoMessage Uses

func (*ExecuteOptions) ProtoMessage()

func (*ExecuteOptions) Reset Uses

func (m *ExecuteOptions) Reset()

func (*ExecuteOptions) String Uses

func (m *ExecuteOptions) String() string

type ExecuteOptions_IncludedFields Uses

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 Uses

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

func (ExecuteOptions_IncludedFields) String Uses

func (x ExecuteOptions_IncludedFields) String() string

type Field Uses

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"`
    // 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" json:"table,omitempty"`
    OrgTable string `protobuf:"bytes,4,opt,name=org_table,json=orgTable" json:"org_table,omitempty"`
    Database string `protobuf:"bytes,5,opt,name=database" json:"database,omitempty"`
    OrgName  string `protobuf:"bytes,6,opt,name=org_name,json=orgName" 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" json:"column_length,omitempty"`
    // charset is actually a uint16. Only the lower 16 bits are used.
    Charset uint32 `protobuf:"varint,8,opt,name=charset" json:"charset,omitempty"`
    // decimals is actualy a uint8. Only the lower 8 bits are used.
    Decimals uint32 `protobuf:"varint,9,opt,name=decimals" json:"decimals,omitempty"`
    // flags is actually a uint16. Only the lower 16 bits are used.
    Flags uint32 `protobuf:"varint,10,opt,name=flags" json:"flags,omitempty"`
}

Field describes a single column returned by a query

func (*Field) Descriptor Uses

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

func (*Field) GetCharset Uses

func (m *Field) GetCharset() uint32

func (*Field) GetColumnLength Uses

func (m *Field) GetColumnLength() uint32

func (*Field) GetDatabase Uses

func (m *Field) GetDatabase() string

func (*Field) GetDecimals Uses

func (m *Field) GetDecimals() uint32

func (*Field) GetFlags Uses

func (m *Field) GetFlags() uint32

func (*Field) GetName Uses

func (m *Field) GetName() string

func (*Field) GetOrgName Uses

func (m *Field) GetOrgName() string

func (*Field) GetOrgTable Uses

func (m *Field) GetOrgTable() string

func (*Field) GetTable Uses

func (m *Field) GetTable() string

func (*Field) GetType Uses

func (m *Field) GetType() Type

func (*Field) ProtoMessage Uses

func (*Field) ProtoMessage()

func (*Field) Reset Uses

func (m *Field) Reset()

func (*Field) String Uses

func (m *Field) String() string

type Flag Uses

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 Uses

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

func (Flag) String Uses

func (x Flag) String() string

type MySqlFlag Uses

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 Uses

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

func (MySqlFlag) String Uses

func (x MySqlFlag) String() string

type QueryResult Uses

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"`
    Extras       *ResultExtras `protobuf:"bytes,5,opt,name=extras" json:"extras,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 Uses

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

func (*QueryResult) GetExtras Uses

func (m *QueryResult) GetExtras() *ResultExtras

func (*QueryResult) GetFields Uses

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

func (*QueryResult) GetInsertId Uses

func (m *QueryResult) GetInsertId() uint64

func (*QueryResult) GetRows Uses

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

func (*QueryResult) GetRowsAffected Uses

func (m *QueryResult) GetRowsAffected() uint64

func (*QueryResult) ProtoMessage Uses

func (*QueryResult) ProtoMessage()

func (*QueryResult) Reset Uses

func (m *QueryResult) Reset()

func (*QueryResult) String Uses

func (m *QueryResult) String() string

type ResultExtras Uses

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" 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" json:"fresher,omitempty"`
}

ResultExtras contains optional out-of-band information. Usually the extras are requested by adding ExecuteOptions flags.

func (*ResultExtras) Descriptor Uses

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

func (*ResultExtras) GetEventToken Uses

func (m *ResultExtras) GetEventToken() *EventToken

func (*ResultExtras) GetFresher Uses

func (m *ResultExtras) GetFresher() bool

func (*ResultExtras) ProtoMessage Uses

func (*ResultExtras) ProtoMessage()

func (*ResultExtras) Reset Uses

func (m *ResultExtras) Reset()

func (*ResultExtras) String Uses

func (m *ResultExtras) String() string

type Row Uses

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" 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 Uses

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

func (*Row) GetLengths Uses

func (m *Row) GetLengths() []int64

func (*Row) GetValues Uses

func (m *Row) GetValues() []byte

func (*Row) ProtoMessage Uses

func (*Row) ProtoMessage()

func (*Row) Reset Uses

func (m *Row) Reset()

func (*Row) String Uses

func (m *Row) String() string

type SplitQueryRequest_Algorithm Uses

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

func (SplitQueryRequest_Algorithm) EnumDescriptor Uses

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

func (SplitQueryRequest_Algorithm) String Uses

func (x SplitQueryRequest_Algorithm) String() string

type StreamEvent Uses

type StreamEvent struct {
    // The statements in this transaction.
    Statements []*StreamEvent_Statement `protobuf:"bytes,1,rep,name=statements" json:"statements,omitempty"`
    // The Event Token for this event.
    EventToken *EventToken `protobuf:"bytes,2,opt,name=event_token,json=eventToken" json:"event_token,omitempty"`
}

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 Uses

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

func (*StreamEvent) GetEventToken Uses

func (m *StreamEvent) GetEventToken() *EventToken

func (*StreamEvent) GetStatements Uses

func (m *StreamEvent) GetStatements() []*StreamEvent_Statement

func (*StreamEvent) ProtoMessage Uses

func (*StreamEvent) ProtoMessage()

func (*StreamEvent) Reset Uses

func (m *StreamEvent) Reset()

func (*StreamEvent) String Uses

func (m *StreamEvent) String() string

type StreamEvent_Statement Uses

type StreamEvent_Statement struct {
    Category StreamEvent_Statement_Category `protobuf:"varint,1,opt,name=category,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" json:"table_name,omitempty"`
    PrimaryKeyFields []*Field `protobuf:"bytes,3,rep,name=primary_key_fields,json=primaryKeyFields" json:"primary_key_fields,omitempty"`
    PrimaryKeyValues []*Row   `protobuf:"bytes,4,rep,name=primary_key_values,json=primaryKeyValues" 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"`
}

One individual Statement in a transaction.

func (*StreamEvent_Statement) Descriptor Uses

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

func (*StreamEvent_Statement) GetCategory Uses

func (m *StreamEvent_Statement) GetCategory() StreamEvent_Statement_Category

func (*StreamEvent_Statement) GetPrimaryKeyFields Uses

func (m *StreamEvent_Statement) GetPrimaryKeyFields() []*Field

func (*StreamEvent_Statement) GetPrimaryKeyValues Uses

func (m *StreamEvent_Statement) GetPrimaryKeyValues() []*Row

func (*StreamEvent_Statement) GetSql Uses

func (m *StreamEvent_Statement) GetSql() []byte

func (*StreamEvent_Statement) GetTableName Uses

func (m *StreamEvent_Statement) GetTableName() string

func (*StreamEvent_Statement) ProtoMessage Uses

func (*StreamEvent_Statement) ProtoMessage()

func (*StreamEvent_Statement) Reset Uses

func (m *StreamEvent_Statement) Reset()

func (*StreamEvent_Statement) String Uses

func (m *StreamEvent_Statement) String() string

type StreamEvent_Statement_Category Uses

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 Uses

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

func (StreamEvent_Statement_Category) String Uses

func (x StreamEvent_Statement_Category) String() string

type Target Uses

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"`
}

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

func (*Target) Descriptor Uses

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

func (*Target) GetKeyspace Uses

func (m *Target) GetKeyspace() string

func (*Target) GetShard Uses

func (m *Target) GetShard() string

func (*Target) ProtoMessage Uses

func (*Target) ProtoMessage()

func (*Target) Reset Uses

func (m *Target) Reset()

func (*Target) String Uses

func (m *Target) String() string

type TransactionMetadata Uses

type TransactionMetadata struct {
    Dtid         string           `protobuf:"bytes,1,opt,name=dtid" json:"dtid,omitempty"`
    State        TransactionState `protobuf:"varint,2,opt,name=state,enum=query.TransactionState" json:"state,omitempty"`
    TimeCreated  int64            `protobuf:"varint,3,opt,name=time_created,json=timeCreated" json:"time_created,omitempty"`
    Participants []*Target        `protobuf:"bytes,4,rep,name=participants" json:"participants,omitempty"`
}

TransactionMetadata contains the metadata for a distributed transaction.

func (*TransactionMetadata) Descriptor Uses

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

func (*TransactionMetadata) GetDtid Uses

func (m *TransactionMetadata) GetDtid() string

func (*TransactionMetadata) GetParticipants Uses

func (m *TransactionMetadata) GetParticipants() []*Target

func (*TransactionMetadata) GetState Uses

func (m *TransactionMetadata) GetState() TransactionState

func (*TransactionMetadata) GetTimeCreated Uses

func (m *TransactionMetadata) GetTimeCreated() int64

func (*TransactionMetadata) ProtoMessage Uses

func (*TransactionMetadata) ProtoMessage()

func (*TransactionMetadata) Reset Uses

func (m *TransactionMetadata) Reset()

func (*TransactionMetadata) String Uses

func (m *TransactionMetadata) String() string

type TransactionState Uses

type TransactionState int32

TransactionState represents the state of a distributed transaction.

const (
    TransactionState_UNKNOWN  TransactionState = 0
    TransactionState_PREPARE  TransactionState = 1
    TransactionState_COMMIT   TransactionState = 2
    TransactionState_ROLLBACK TransactionState = 3
)

func (TransactionState) EnumDescriptor Uses

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

func (TransactionState) String Uses

func (x TransactionState) String() string

type Type Uses

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
    // GEOMETRY specifies a GEOMETRY type.
    // Properties: 29, IsQuoted.
    Type_GEOMETRY Type = 2077
    // JSON specified a JSON type.
    // Properties: 30, IsQuoted.
    Type_JSON Type = 2078
)

func (Type) EnumDescriptor Uses

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

func (Type) String Uses

func (x Type) String() string

type VTGateCallerID Uses

type VTGateCallerID struct {
    Username string   `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
    Groups   []string `protobuf:"bytes,2,rep,name=groups" json:"groups,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 Uses

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

func (*VTGateCallerID) GetGroups Uses

func (m *VTGateCallerID) GetGroups() []string

func (*VTGateCallerID) GetUsername Uses

func (m *VTGateCallerID) GetUsername() string

func (*VTGateCallerID) ProtoMessage Uses

func (*VTGateCallerID) ProtoMessage()

func (*VTGateCallerID) Reset Uses

func (m *VTGateCallerID) Reset()

func (*VTGateCallerID) String Uses

func (m *VTGateCallerID) String() string

type Value Uses

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 Uses

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

func (*Value) GetType Uses

func (m *Value) GetType() Type

func (*Value) GetValue Uses

func (m *Value) GetValue() []byte

func (*Value) ProtoMessage Uses

func (*Value) ProtoMessage()

func (*Value) Reset Uses

func (m *Value) Reset()

func (*Value) String Uses

func (m *Value) String() string

Package query imports 3 packages (graph) and is imported by 2 packages. Updated 2019-08-11. Refresh now. Tools for package owners.