1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/spanner/v1/result_set.proto 3 4package spanner // import "google.golang.org/genproto/googleapis/spanner/v1" 5 6import proto "github.com/golang/protobuf/proto" 7import fmt "fmt" 8import math "math" 9import _struct "github.com/golang/protobuf/ptypes/struct" 10import _ "google.golang.org/genproto/googleapis/api/annotations" 11 12// Reference imports to suppress errors if they are not otherwise used. 13var _ = proto.Marshal 14var _ = fmt.Errorf 15var _ = math.Inf 16 17// This is a compile-time assertion to ensure that this generated file 18// is compatible with the proto package it is being compiled against. 19// A compilation error at this line likely means your copy of the 20// proto package needs to be updated. 21const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 22 23// Results from [Read][google.spanner.v1.Spanner.Read] or 24// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. 25type ResultSet struct { 26 // Metadata about the result set, such as row type information. 27 Metadata *ResultSetMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` 28 // Each element in `rows` is a row whose format is defined by 29 // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element 30 // in each row matches the ith field in 31 // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are 32 // encoded based on type as described 33 // [here][google.spanner.v1.TypeCode]. 34 Rows []*_struct.ListValue `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"` 35 // Query plan and execution statistics for the query that produced this 36 // result set. These can be requested by setting 37 // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. 38 Stats *ResultSetStats `protobuf:"bytes,3,opt,name=stats,proto3" json:"stats,omitempty"` 39 XXX_NoUnkeyedLiteral struct{} `json:"-"` 40 XXX_unrecognized []byte `json:"-"` 41 XXX_sizecache int32 `json:"-"` 42} 43 44func (m *ResultSet) Reset() { *m = ResultSet{} } 45func (m *ResultSet) String() string { return proto.CompactTextString(m) } 46func (*ResultSet) ProtoMessage() {} 47func (*ResultSet) Descriptor() ([]byte, []int) { 48 return fileDescriptor_result_set_d3beff64c1ecf5a2, []int{0} 49} 50func (m *ResultSet) XXX_Unmarshal(b []byte) error { 51 return xxx_messageInfo_ResultSet.Unmarshal(m, b) 52} 53func (m *ResultSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 54 return xxx_messageInfo_ResultSet.Marshal(b, m, deterministic) 55} 56func (dst *ResultSet) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_ResultSet.Merge(dst, src) 58} 59func (m *ResultSet) XXX_Size() int { 60 return xxx_messageInfo_ResultSet.Size(m) 61} 62func (m *ResultSet) XXX_DiscardUnknown() { 63 xxx_messageInfo_ResultSet.DiscardUnknown(m) 64} 65 66var xxx_messageInfo_ResultSet proto.InternalMessageInfo 67 68func (m *ResultSet) GetMetadata() *ResultSetMetadata { 69 if m != nil { 70 return m.Metadata 71 } 72 return nil 73} 74 75func (m *ResultSet) GetRows() []*_struct.ListValue { 76 if m != nil { 77 return m.Rows 78 } 79 return nil 80} 81 82func (m *ResultSet) GetStats() *ResultSetStats { 83 if m != nil { 84 return m.Stats 85 } 86 return nil 87} 88 89// Partial results from a streaming read or SQL query. Streaming reads and 90// SQL queries better tolerate large result sets, large rows, and large 91// values, but are a little trickier to consume. 92type PartialResultSet struct { 93 // Metadata about the result set, such as row type information. 94 // Only present in the first response. 95 Metadata *ResultSetMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` 96 // A streamed result set consists of a stream of values, which might 97 // be split into many `PartialResultSet` messages to accommodate 98 // large rows and/or large values. Every N complete values defines a 99 // row, where N is equal to the number of entries in 100 // [metadata.row_type.fields][google.spanner.v1.StructType.fields]. 101 // 102 // Most values are encoded based on type as described 103 // [here][google.spanner.v1.TypeCode]. 104 // 105 // It is possible that the last value in values is "chunked", 106 // meaning that the rest of the value is sent in subsequent 107 // `PartialResultSet`(s). This is denoted by the [chunked_value][google.spanner.v1.PartialResultSet.chunked_value] 108 // field. Two or more chunked values can be merged to form a 109 // complete value as follows: 110 // 111 // * `bool/number/null`: cannot be chunked 112 // * `string`: concatenate the strings 113 // * `list`: concatenate the lists. If the last element in a list is a 114 // `string`, `list`, or `object`, merge it with the first element in 115 // the next list by applying these rules recursively. 116 // * `object`: concatenate the (field name, field value) pairs. If a 117 // field name is duplicated, then apply these rules recursively 118 // to merge the field values. 119 // 120 // Some examples of merging: 121 // 122 // # Strings are concatenated. 123 // "foo", "bar" => "foobar" 124 // 125 // # Lists of non-strings are concatenated. 126 // [2, 3], [4] => [2, 3, 4] 127 // 128 // # Lists are concatenated, but the last and first elements are merged 129 // # because they are strings. 130 // ["a", "b"], ["c", "d"] => ["a", "bc", "d"] 131 // 132 // # Lists are concatenated, but the last and first elements are merged 133 // # because they are lists. Recursively, the last and first elements 134 // # of the inner lists are merged because they are strings. 135 // ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] 136 // 137 // # Non-overlapping object fields are combined. 138 // {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} 139 // 140 // # Overlapping object fields are merged. 141 // {"a": "1"}, {"a": "2"} => {"a": "12"} 142 // 143 // # Examples of merging objects containing lists of strings. 144 // {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} 145 // 146 // For a more complete example, suppose a streaming SQL query is 147 // yielding a result set whose rows contain a single string 148 // field. The following `PartialResultSet`s might be yielded: 149 // 150 // { 151 // "metadata": { ... } 152 // "values": ["Hello", "W"] 153 // "chunked_value": true 154 // "resume_token": "Af65..." 155 // } 156 // { 157 // "values": ["orl"] 158 // "chunked_value": true 159 // "resume_token": "Bqp2..." 160 // } 161 // { 162 // "values": ["d"] 163 // "resume_token": "Zx1B..." 164 // } 165 // 166 // This sequence of `PartialResultSet`s encodes two rows, one 167 // containing the field value `"Hello"`, and a second containing the 168 // field value `"World" = "W" + "orl" + "d"`. 169 Values []*_struct.Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` 170 // If true, then the final value in [values][google.spanner.v1.PartialResultSet.values] is chunked, and must 171 // be combined with more values from subsequent `PartialResultSet`s 172 // to obtain a complete field value. 173 ChunkedValue bool `protobuf:"varint,3,opt,name=chunked_value,json=chunkedValue,proto3" json:"chunked_value,omitempty"` 174 // Streaming calls might be interrupted for a variety of reasons, such 175 // as TCP connection loss. If this occurs, the stream of results can 176 // be resumed by re-sending the original request and including 177 // `resume_token`. Note that executing any other transaction in the 178 // same session invalidates the token. 179 ResumeToken []byte `protobuf:"bytes,4,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"` 180 // Query plan and execution statistics for the query that produced this 181 // streaming result set. These can be requested by setting 182 // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] and are sent 183 // only once with the last response in the stream. 184 Stats *ResultSetStats `protobuf:"bytes,5,opt,name=stats,proto3" json:"stats,omitempty"` 185 XXX_NoUnkeyedLiteral struct{} `json:"-"` 186 XXX_unrecognized []byte `json:"-"` 187 XXX_sizecache int32 `json:"-"` 188} 189 190func (m *PartialResultSet) Reset() { *m = PartialResultSet{} } 191func (m *PartialResultSet) String() string { return proto.CompactTextString(m) } 192func (*PartialResultSet) ProtoMessage() {} 193func (*PartialResultSet) Descriptor() ([]byte, []int) { 194 return fileDescriptor_result_set_d3beff64c1ecf5a2, []int{1} 195} 196func (m *PartialResultSet) XXX_Unmarshal(b []byte) error { 197 return xxx_messageInfo_PartialResultSet.Unmarshal(m, b) 198} 199func (m *PartialResultSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 200 return xxx_messageInfo_PartialResultSet.Marshal(b, m, deterministic) 201} 202func (dst *PartialResultSet) XXX_Merge(src proto.Message) { 203 xxx_messageInfo_PartialResultSet.Merge(dst, src) 204} 205func (m *PartialResultSet) XXX_Size() int { 206 return xxx_messageInfo_PartialResultSet.Size(m) 207} 208func (m *PartialResultSet) XXX_DiscardUnknown() { 209 xxx_messageInfo_PartialResultSet.DiscardUnknown(m) 210} 211 212var xxx_messageInfo_PartialResultSet proto.InternalMessageInfo 213 214func (m *PartialResultSet) GetMetadata() *ResultSetMetadata { 215 if m != nil { 216 return m.Metadata 217 } 218 return nil 219} 220 221func (m *PartialResultSet) GetValues() []*_struct.Value { 222 if m != nil { 223 return m.Values 224 } 225 return nil 226} 227 228func (m *PartialResultSet) GetChunkedValue() bool { 229 if m != nil { 230 return m.ChunkedValue 231 } 232 return false 233} 234 235func (m *PartialResultSet) GetResumeToken() []byte { 236 if m != nil { 237 return m.ResumeToken 238 } 239 return nil 240} 241 242func (m *PartialResultSet) GetStats() *ResultSetStats { 243 if m != nil { 244 return m.Stats 245 } 246 return nil 247} 248 249// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. 250type ResultSetMetadata struct { 251 // Indicates the field names and types for the rows in the result 252 // set. For example, a SQL query like `"SELECT UserId, UserName FROM 253 // Users"` could return a `row_type` value like: 254 // 255 // "fields": [ 256 // { "name": "UserId", "type": { "code": "INT64" } }, 257 // { "name": "UserName", "type": { "code": "STRING" } }, 258 // ] 259 RowType *StructType `protobuf:"bytes,1,opt,name=row_type,json=rowType,proto3" json:"row_type,omitempty"` 260 // If the read or SQL query began a transaction as a side-effect, the 261 // information about the new transaction is yielded here. 262 Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"` 263 XXX_NoUnkeyedLiteral struct{} `json:"-"` 264 XXX_unrecognized []byte `json:"-"` 265 XXX_sizecache int32 `json:"-"` 266} 267 268func (m *ResultSetMetadata) Reset() { *m = ResultSetMetadata{} } 269func (m *ResultSetMetadata) String() string { return proto.CompactTextString(m) } 270func (*ResultSetMetadata) ProtoMessage() {} 271func (*ResultSetMetadata) Descriptor() ([]byte, []int) { 272 return fileDescriptor_result_set_d3beff64c1ecf5a2, []int{2} 273} 274func (m *ResultSetMetadata) XXX_Unmarshal(b []byte) error { 275 return xxx_messageInfo_ResultSetMetadata.Unmarshal(m, b) 276} 277func (m *ResultSetMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 278 return xxx_messageInfo_ResultSetMetadata.Marshal(b, m, deterministic) 279} 280func (dst *ResultSetMetadata) XXX_Merge(src proto.Message) { 281 xxx_messageInfo_ResultSetMetadata.Merge(dst, src) 282} 283func (m *ResultSetMetadata) XXX_Size() int { 284 return xxx_messageInfo_ResultSetMetadata.Size(m) 285} 286func (m *ResultSetMetadata) XXX_DiscardUnknown() { 287 xxx_messageInfo_ResultSetMetadata.DiscardUnknown(m) 288} 289 290var xxx_messageInfo_ResultSetMetadata proto.InternalMessageInfo 291 292func (m *ResultSetMetadata) GetRowType() *StructType { 293 if m != nil { 294 return m.RowType 295 } 296 return nil 297} 298 299func (m *ResultSetMetadata) GetTransaction() *Transaction { 300 if m != nil { 301 return m.Transaction 302 } 303 return nil 304} 305 306// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. 307type ResultSetStats struct { 308 // [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this result. 309 QueryPlan *QueryPlan `protobuf:"bytes,1,opt,name=query_plan,json=queryPlan,proto3" json:"query_plan,omitempty"` 310 // Aggregated statistics from the execution of the query. Only present when 311 // the query is profiled. For example, a query could return the statistics as 312 // follows: 313 // 314 // { 315 // "rows_returned": "3", 316 // "elapsed_time": "1.22 secs", 317 // "cpu_time": "1.19 secs" 318 // } 319 QueryStats *_struct.Struct `protobuf:"bytes,2,opt,name=query_stats,json=queryStats,proto3" json:"query_stats,omitempty"` 320 XXX_NoUnkeyedLiteral struct{} `json:"-"` 321 XXX_unrecognized []byte `json:"-"` 322 XXX_sizecache int32 `json:"-"` 323} 324 325func (m *ResultSetStats) Reset() { *m = ResultSetStats{} } 326func (m *ResultSetStats) String() string { return proto.CompactTextString(m) } 327func (*ResultSetStats) ProtoMessage() {} 328func (*ResultSetStats) Descriptor() ([]byte, []int) { 329 return fileDescriptor_result_set_d3beff64c1ecf5a2, []int{3} 330} 331func (m *ResultSetStats) XXX_Unmarshal(b []byte) error { 332 return xxx_messageInfo_ResultSetStats.Unmarshal(m, b) 333} 334func (m *ResultSetStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 335 return xxx_messageInfo_ResultSetStats.Marshal(b, m, deterministic) 336} 337func (dst *ResultSetStats) XXX_Merge(src proto.Message) { 338 xxx_messageInfo_ResultSetStats.Merge(dst, src) 339} 340func (m *ResultSetStats) XXX_Size() int { 341 return xxx_messageInfo_ResultSetStats.Size(m) 342} 343func (m *ResultSetStats) XXX_DiscardUnknown() { 344 xxx_messageInfo_ResultSetStats.DiscardUnknown(m) 345} 346 347var xxx_messageInfo_ResultSetStats proto.InternalMessageInfo 348 349func (m *ResultSetStats) GetQueryPlan() *QueryPlan { 350 if m != nil { 351 return m.QueryPlan 352 } 353 return nil 354} 355 356func (m *ResultSetStats) GetQueryStats() *_struct.Struct { 357 if m != nil { 358 return m.QueryStats 359 } 360 return nil 361} 362 363func init() { 364 proto.RegisterType((*ResultSet)(nil), "google.spanner.v1.ResultSet") 365 proto.RegisterType((*PartialResultSet)(nil), "google.spanner.v1.PartialResultSet") 366 proto.RegisterType((*ResultSetMetadata)(nil), "google.spanner.v1.ResultSetMetadata") 367 proto.RegisterType((*ResultSetStats)(nil), "google.spanner.v1.ResultSetStats") 368} 369 370func init() { 371 proto.RegisterFile("google/spanner/v1/result_set.proto", fileDescriptor_result_set_d3beff64c1ecf5a2) 372} 373 374var fileDescriptor_result_set_d3beff64c1ecf5a2 = []byte{ 375 // 501 bytes of a gzipped FileDescriptorProto 376 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xcd, 0x6e, 0x13, 0x31, 377 0x14, 0x85, 0xe5, 0xf4, 0x87, 0xd4, 0x13, 0x10, 0xb5, 0x04, 0x1d, 0x45, 0x05, 0xa5, 0x29, 0x8b, 378 0xac, 0x3c, 0x4a, 0x59, 0x10, 0xa9, 0x9b, 0xaa, 0x2c, 0xd8, 0x80, 0x14, 0x9c, 0x28, 0x0b, 0x14, 379 0x69, 0xe4, 0x26, 0x66, 0x18, 0x75, 0x62, 0x4f, 0x6d, 0x4f, 0xa2, 0x3c, 0x00, 0x62, 0xc9, 0x9e, 380 0x47, 0xe0, 0x01, 0x78, 0x08, 0x9e, 0x88, 0x25, 0xf2, 0xcf, 0x24, 0x81, 0x19, 0x21, 0x21, 0x75, 381 0xe7, 0xf8, 0x7e, 0xe7, 0x9e, 0x7b, 0x3c, 0x37, 0xb0, 0x9b, 0x08, 0x91, 0x64, 0x2c, 0x52, 0x39, 382 0xe5, 0x9c, 0xc9, 0x68, 0xd9, 0x8f, 0x24, 0x53, 0x45, 0xa6, 0x63, 0xc5, 0x34, 0xce, 0xa5, 0xd0, 383 0x02, 0x1d, 0x3b, 0x06, 0x7b, 0x06, 0x2f, 0xfb, 0xed, 0x53, 0x2f, 0xa3, 0x79, 0x1a, 0x51, 0xce, 384 0x85, 0xa6, 0x3a, 0x15, 0x5c, 0x39, 0xc1, 0xa6, 0x6a, 0x7f, 0xdd, 0x14, 0x1f, 0x23, 0xa5, 0x65, 385 0x31, 0xf3, 0xed, 0xda, 0x35, 0x96, 0x77, 0x05, 0x93, 0xeb, 0x38, 0xcf, 0x28, 0xf7, 0xcc, 0x79, 386 0x95, 0xd1, 0x92, 0x72, 0x45, 0x67, 0xc6, 0xe7, 0x2f, 0x9b, 0x5d, 0x68, 0x9d, 0x33, 0x57, 0xed, 387 0xfe, 0x00, 0xf0, 0x88, 0xd8, 0x28, 0x23, 0xa6, 0xd1, 0x15, 0x6c, 0x2e, 0x98, 0xa6, 0x73, 0xaa, 388 0x69, 0x08, 0x3a, 0xa0, 0x17, 0x5c, 0xbc, 0xc0, 0x95, 0x58, 0x78, 0xc3, 0xbf, 0xf3, 0x2c, 0xd9, 389 0xa8, 0x10, 0x86, 0xfb, 0x52, 0xac, 0x54, 0xd8, 0xe8, 0xec, 0xf5, 0x82, 0x8b, 0x76, 0xa9, 0x2e,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, 0xb9, 0x89, 0x4e, 0x2a, 0xdf, 0xc5, 0x85, 0x21, 0xce, 0xc8, 0xda, 0x5e, 0x7f, 402 0x03, 0xf0, 0xc9, 0x4c, 0x2c, 0xaa, 0x46, 0xd7, 0xdb, 0x01, 0x87, 0x46, 0x3f, 0x04, 0x1f, 0x06, 403 0x1e, 0x4a, 0x44, 0x46, 0x79, 0x82, 0x85, 0x4c, 0xa2, 0x84, 0x71, 0xdb, 0x3d, 0x72, 0x25, 0x9a, 404 0xa7, 0x6a, 0xe7, 0x5f, 0x74, 0xe9, 0x8f, 0xbf, 0x00, 0xf8, 0xde, 0x38, 0x79, 0xe3, 0xd4, 0xaf, 405 0x33, 0x51, 0xcc, 0xf1, 0xc8, 0x1b, 0x4d, 0xfa, 0x3f, 0xcb, 0xca, 0xd4, 0x56, 0xa6, 0xbe, 0x32, 406 0x9d, 0xf4, 0x6f, 0x0e, 0x6d, 0xef, 0x97, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x06, 0x67, 0x6c, 407 0xee, 0x5c, 0x04, 0x00, 0x00, 408} 409