From 835c9b7d97673c4ac2d7c7a15c623e89fbaabd1f Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Mon, 24 Jul 2023 15:08:50 -0700 Subject: [PATCH 1/2] fix(vet): Split vet messages out of codegen.proto --- internal/cmd/vet.go | 48 +- internal/plugin/codegen.pb.go | 1647 +-- internal/plugin/codegen_vtproto.pb.go | 14089 ++++++------------------ internal/vet/vet.pb.go | 1650 +++ internal/vet/vet_vtproto.pb.go | 6886 ++++++++++++ protos/plugin/codegen.proto | 129 - protos/vet/vet.proto | 134 + 7 files changed, 12397 insertions(+), 12186 deletions(-) create mode 100644 internal/vet/vet.pb.go create mode 100644 internal/vet/vet_vtproto.pb.go create mode 100644 protos/vet/vet.proto diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index afe2f46f42..9c4123d0b0 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -28,6 +28,7 @@ import ( "github.com/kyleconroy/sqlc/internal/plugin" "github.com/kyleconroy/sqlc/internal/shfmt" "github.com/kyleconroy/sqlc/internal/sql/ast" + "github.com/kyleconroy/sqlc/internal/vet" ) var ErrFailedChecks = errors.New("failed checks") @@ -77,22 +78,22 @@ func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) err cel.StdLib(), ext.Strings(ext.StringsVersion(1)), cel.Types( - &plugin.VetConfig{}, - &plugin.VetQuery{}, - &plugin.PostgreSQLExplain{}, - &plugin.MySQLExplain{}, + &vet.Config{}, + &vet.Query{}, + &vet.PostgreSQLExplain{}, + &vet.MySQLExplain{}, ), cel.Variable("query", - cel.ObjectType("plugin.VetQuery"), + cel.ObjectType("vet.Query"), ), cel.Variable("config", - cel.ObjectType("plugin.VetConfig"), + cel.ObjectType("vet.Config"), ), cel.Variable("postgresql", - cel.ObjectType("plugin.PostgreSQL"), + cel.ObjectType("vet.PostgreSQL"), ), cel.Variable("mysql", - cel.ObjectType("plugin.MySQL"), + cel.ObjectType("vet.MySQL"), ), ) if err != nil { @@ -200,7 +201,7 @@ func (p *pgxConn) Prepare(ctx context.Context, name, query string) error { } func (p *pgxConn) Explain(ctx context.Context, query string, args ...*plugin.Parameter) (*vetEngineOutput, error) { - eQuery := "EXPLAIN (ANALYZE false, VERBOSE, COSTS, SETTINGS, BUFFERS, FORMAT JSON) "+query + eQuery := "EXPLAIN (ANALYZE false, VERBOSE, COSTS, SETTINGS, BUFFERS, FORMAT JSON) " + query eArgs := make([]any, len(args)) row := p.c.QueryRow(ctx, eQuery, eArgs...) var result []json.RawMessage @@ -211,11 +212,11 @@ func (p *pgxConn) Explain(ctx context.Context, query string, args ...*plugin.Par fmt.Println(eQuery) fmt.Println(string(result[0])) } - var explain plugin.PostgreSQLExplain + var explain vet.PostgreSQLExplain if err := pjson.Unmarshal(result[0], &explain); err != nil { return nil, err } - return &vetEngineOutput{PostgreSQL: &plugin.PostgreSQL{Explain: &explain}}, nil + return &vetEngineOutput{PostgreSQL: &vet.PostgreSQL{Explain: &explain}}, nil } type dbPreparer struct { @@ -237,7 +238,7 @@ type mysqlExplainer struct { } func (me *mysqlExplainer) Explain(ctx context.Context, query string, args ...*plugin.Parameter) (*vetEngineOutput, error) { - eQuery := "EXPLAIN FORMAT=JSON "+query + eQuery := "EXPLAIN FORMAT=JSON " + query eArgs := make([]any, len(args)) row := me.QueryRowContext(ctx, eQuery, eArgs...) var result json.RawMessage @@ -248,14 +249,14 @@ func (me *mysqlExplainer) Explain(ctx context.Context, query string, args ...*pl fmt.Println(eQuery) fmt.Println(string(result)) } - var explain plugin.MySQLExplain + var explain vet.MySQLExplain if err := pjson.Unmarshal(result, &explain); err != nil { return nil, err } if explain.QueryBlock.Message != "" { return nil, fmt.Errorf("mysql explain: %s", explain.QueryBlock.Message) } - return &vetEngineOutput{MySQL: &plugin.MySQL{Explain: &explain}}, nil + return &vetEngineOutput{MySQL: &vet.MySQL{Explain: &explain}}, nil } type rule struct { @@ -412,7 +413,8 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } // Get explain output for this query if we need it - _, pgsqlOK := evalMap["postgresql"]; _, mysqlOK := evalMap["mysql"] + _, pgsqlOK := evalMap["postgresql"] + _, mysqlOK := evalMap["mysql"] if rule.NeedsExplain && !(pgsqlOK || mysqlOK) { if expl == nil { fmt.Fprintf(c.Stderr, "%s: %s: %s: error explaining query: database connection required\n", query.Filename, query.Name, name) @@ -455,8 +457,8 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { return nil } -func vetConfig(req *plugin.CodeGenRequest) *plugin.VetConfig { - return &plugin.VetConfig{ +func vetConfig(req *plugin.CodeGenRequest) *vet.Config { + return &vet.Config{ Version: req.Settings.Version, Engine: req.Settings.Engine, Schema: req.Settings.Schema, @@ -464,14 +466,14 @@ func vetConfig(req *plugin.CodeGenRequest) *plugin.VetConfig { } } -func vetQuery(q *plugin.Query) *plugin.VetQuery { - var params []*plugin.VetParameter +func vetQuery(q *plugin.Query) *vet.Query { + var params []*vet.Parameter for _, p := range q.Params { - params = append(params, &plugin.VetParameter{ + params = append(params, &vet.Parameter{ Number: p.Number, }) } - return &plugin.VetQuery{ + return &vet.Query{ Sql: q.Text, Name: q.Name, Cmd: strings.TrimPrefix(":", q.Cmd), @@ -480,6 +482,6 @@ func vetQuery(q *plugin.Query) *plugin.VetQuery { } type vetEngineOutput struct { - PostgreSQL *plugin.PostgreSQL - MySQL *plugin.MySQL + PostgreSQL *vet.PostgreSQL + MySQL *vet.MySQL } diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index c0544e4ed6..03f16037b4 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -1593,1149 +1593,6 @@ func (x *CodeGenResponse) GetFiles() []*File { return nil } -type VetParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` -} - -func (x *VetParameter) Reset() { - *x = VetParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VetParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VetParameter) ProtoMessage() {} - -func (x *VetParameter) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VetParameter.ProtoReflect.Descriptor instead. -func (*VetParameter) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{18} -} - -func (x *VetParameter) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -type VetConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Engine string `protobuf:"bytes,2,opt,name=engine,proto3" json:"engine,omitempty"` - Schema []string `protobuf:"bytes,3,rep,name=schema,proto3" json:"schema,omitempty"` - Queries []string `protobuf:"bytes,4,rep,name=queries,proto3" json:"queries,omitempty"` -} - -func (x *VetConfig) Reset() { - *x = VetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VetConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VetConfig) ProtoMessage() {} - -func (x *VetConfig) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VetConfig.ProtoReflect.Descriptor instead. -func (*VetConfig) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{19} -} - -func (x *VetConfig) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *VetConfig) GetEngine() string { - if x != nil { - return x.Engine - } - return "" -} - -func (x *VetConfig) GetSchema() []string { - if x != nil { - return x.Schema - } - return nil -} - -func (x *VetConfig) GetQueries() []string { - if x != nil { - return x.Queries - } - return nil -} - -type VetQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` - Params []*VetParameter `protobuf:"bytes,4,rep,name=params,json=parameters,proto3" json:"params,omitempty"` -} - -func (x *VetQuery) Reset() { - *x = VetQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VetQuery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VetQuery) ProtoMessage() {} - -func (x *VetQuery) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VetQuery.ProtoReflect.Descriptor instead. -func (*VetQuery) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{20} -} - -func (x *VetQuery) GetSql() string { - if x != nil { - return x.Sql - } - return "" -} - -func (x *VetQuery) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VetQuery) GetCmd() string { - if x != nil { - return x.Cmd - } - return "" -} - -func (x *VetQuery) GetParams() []*VetParameter { - if x != nil { - return x.Params - } - return nil -} - -type PostgreSQL struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Explain *PostgreSQLExplain `protobuf:"bytes,1,opt,name=explain,proto3" json:"explain,omitempty"` -} - -func (x *PostgreSQL) Reset() { - *x = PostgreSQL{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostgreSQL) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostgreSQL) ProtoMessage() {} - -func (x *PostgreSQL) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostgreSQL.ProtoReflect.Descriptor instead. -func (*PostgreSQL) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{21} -} - -func (x *PostgreSQL) GetExplain() *PostgreSQLExplain { - if x != nil { - return x.Explain - } - return nil -} - -type PostgreSQLExplain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Plan *PostgreSQLExplain_Plan `protobuf:"bytes,1,opt,name=plan,json=Plan,proto3" json:"plan,omitempty"` - Settings map[string]string `protobuf:"bytes,2,rep,name=settings,json=Settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Planning *PostgreSQLExplain_Planning `protobuf:"bytes,3,opt,name=planning,json=Planning,proto3" json:"planning,omitempty"` -} - -func (x *PostgreSQLExplain) Reset() { - *x = PostgreSQLExplain{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostgreSQLExplain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostgreSQLExplain) ProtoMessage() {} - -func (x *PostgreSQLExplain) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostgreSQLExplain.ProtoReflect.Descriptor instead. -func (*PostgreSQLExplain) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{22} -} - -func (x *PostgreSQLExplain) GetPlan() *PostgreSQLExplain_Plan { - if x != nil { - return x.Plan - } - return nil -} - -func (x *PostgreSQLExplain) GetSettings() map[string]string { - if x != nil { - return x.Settings - } - return nil -} - -func (x *PostgreSQLExplain) GetPlanning() *PostgreSQLExplain_Planning { - if x != nil { - return x.Planning - } - return nil -} - -type MySQL struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Explain *MySQLExplain `protobuf:"bytes,1,opt,name=explain,proto3" json:"explain,omitempty"` -} - -func (x *MySQL) Reset() { - *x = MySQL{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQL) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQL) ProtoMessage() {} - -func (x *MySQL) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQL.ProtoReflect.Descriptor instead. -func (*MySQL) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{23} -} - -func (x *MySQL) GetExplain() *MySQLExplain { - if x != nil { - return x.Explain - } - return nil -} - -type MySQLExplain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - QueryBlock *MySQLExplain_QueryBlock `protobuf:"bytes,1,opt,name=query_block,json=queryBlock,proto3" json:"query_block,omitempty"` -} - -func (x *MySQLExplain) Reset() { - *x = MySQLExplain{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQLExplain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQLExplain) ProtoMessage() {} - -func (x *MySQLExplain) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQLExplain.ProtoReflect.Descriptor instead. -func (*MySQLExplain) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{24} -} - -func (x *MySQLExplain) GetQueryBlock() *MySQLExplain_QueryBlock { - if x != nil { - return x.QueryBlock - } - return nil -} - -type PostgreSQLExplain_Plan struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeType string `protobuf:"bytes,1,opt,name=node_type,json=Node Type,proto3" json:"node_type,omitempty"` - ParentRelationship string `protobuf:"bytes,2,opt,name=parent_relationship,json=Parent Relationship,proto3" json:"parent_relationship,omitempty"` - RelationName string `protobuf:"bytes,3,opt,name=relation_name,json=Relation Name,proto3" json:"relation_name,omitempty"` - Schema string `protobuf:"bytes,4,opt,name=schema,json=Schema,proto3" json:"schema,omitempty"` - Alias string `protobuf:"bytes,5,opt,name=alias,json=Alias,proto3" json:"alias,omitempty"` - ParallelAware bool `protobuf:"varint,6,opt,name=parallel_aware,json=Parallel Aware,proto3" json:"parallel_aware,omitempty"` - AsyncCapable bool `protobuf:"varint,7,opt,name=async_capable,json=Async Capable,proto3" json:"async_capable,omitempty"` - StartupCost float32 `protobuf:"fixed32,8,opt,name=startup_cost,json=Startup Cost,proto3" json:"startup_cost,omitempty"` - TotalCost float32 `protobuf:"fixed32,9,opt,name=total_cost,json=Total Cost,proto3" json:"total_cost,omitempty"` - PlanRows uint64 `protobuf:"varint,10,opt,name=plan_rows,json=Plan Rows,proto3" json:"plan_rows,omitempty"` - PlanWidth uint64 `protobuf:"varint,11,opt,name=plan_width,json=Plan Width,proto3" json:"plan_width,omitempty"` - Output []string `protobuf:"bytes,12,rep,name=output,json=Output,proto3" json:"output,omitempty"` - Plans []*PostgreSQLExplain_Plan `protobuf:"bytes,13,rep,name=plans,json=Plans,proto3" json:"plans,omitempty"` - // Embedded "Blocks" fields - SharedHitBlocks uint64 `protobuf:"varint,14,opt,name=shared_hit_blocks,json=Shared Hit Blocks,proto3" json:"shared_hit_blocks,omitempty"` - SharedReadBlocks uint64 `protobuf:"varint,15,opt,name=shared_read_blocks,json=Shared Read Blocks,proto3" json:"shared_read_blocks,omitempty"` - SharedDirtiedBlocks uint64 `protobuf:"varint,16,opt,name=shared_dirtied_blocks,json=Shared Dirtied Blocks,proto3" json:"shared_dirtied_blocks,omitempty"` - SharedWrittenBlocks uint64 `protobuf:"varint,17,opt,name=shared_written_blocks,json=Shared Written Blocks,proto3" json:"shared_written_blocks,omitempty"` - LocalHitBlocks uint64 `protobuf:"varint,18,opt,name=local_hit_blocks,json=Local Hit Blocks,proto3" json:"local_hit_blocks,omitempty"` - LocalReadBlocks uint64 `protobuf:"varint,19,opt,name=local_read_blocks,json=Local Read Blocks,proto3" json:"local_read_blocks,omitempty"` - LocalDirtiedBlocks uint64 `protobuf:"varint,20,opt,name=local_dirtied_blocks,json=Local Dirtied Blocks,proto3" json:"local_dirtied_blocks,omitempty"` - LocalWrittenBlocks uint64 `protobuf:"varint,21,opt,name=local_written_blocks,json=Local Written Blocks,proto3" json:"local_written_blocks,omitempty"` - TempReadBlocks uint64 `protobuf:"varint,22,opt,name=temp_read_blocks,json=Temp Read Blocks,proto3" json:"temp_read_blocks,omitempty"` - TempWrittenBlocks uint64 `protobuf:"varint,23,opt,name=temp_written_blocks,json=Temp Written Blocks,proto3" json:"temp_written_blocks,omitempty"` - // "Node Type": "Sort" fields - SortKey []string `protobuf:"bytes,24,rep,name=sort_key,json=Sort Key,proto3" json:"sort_key,omitempty"` - // "Node Type": "Hash Join" fields - JoinType string `protobuf:"bytes,25,opt,name=join_type,json=Join Type,proto3" json:"join_type,omitempty"` - InnerUnique bool `protobuf:"varint,26,opt,name=inner_unique,json=Inner Unique,proto3" json:"inner_unique,omitempty"` - HashCond string `protobuf:"bytes,27,opt,name=hash_cond,json=Hash Cond,proto3" json:"hash_cond,omitempty"` - // "Node Type": "Index Scan" fields - IndexName string `protobuf:"bytes,28,opt,name=index_name,json=Index Name,proto3" json:"index_name,omitempty"` - ScanDirection string `protobuf:"bytes,29,opt,name=scan_direction,json=Scan Direction,proto3" json:"scan_direction,omitempty"` - IndexCond string `protobuf:"bytes,30,opt,name=index_cond,json=Index Cond,proto3" json:"index_cond,omitempty"` -} - -func (x *PostgreSQLExplain_Plan) Reset() { - *x = PostgreSQLExplain_Plan{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostgreSQLExplain_Plan) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostgreSQLExplain_Plan) ProtoMessage() {} - -func (x *PostgreSQLExplain_Plan) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostgreSQLExplain_Plan.ProtoReflect.Descriptor instead. -func (*PostgreSQLExplain_Plan) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{22, 1} -} - -func (x *PostgreSQLExplain_Plan) GetNodeType() string { - if x != nil { - return x.NodeType - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetParentRelationship() string { - if x != nil { - return x.ParentRelationship - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetRelationName() string { - if x != nil { - return x.RelationName - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetSchema() string { - if x != nil { - return x.Schema - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetAlias() string { - if x != nil { - return x.Alias - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetParallelAware() bool { - if x != nil { - return x.ParallelAware - } - return false -} - -func (x *PostgreSQLExplain_Plan) GetAsyncCapable() bool { - if x != nil { - return x.AsyncCapable - } - return false -} - -func (x *PostgreSQLExplain_Plan) GetStartupCost() float32 { - if x != nil { - return x.StartupCost - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetTotalCost() float32 { - if x != nil { - return x.TotalCost - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetPlanRows() uint64 { - if x != nil { - return x.PlanRows - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetPlanWidth() uint64 { - if x != nil { - return x.PlanWidth - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetOutput() []string { - if x != nil { - return x.Output - } - return nil -} - -func (x *PostgreSQLExplain_Plan) GetPlans() []*PostgreSQLExplain_Plan { - if x != nil { - return x.Plans - } - return nil -} - -func (x *PostgreSQLExplain_Plan) GetSharedHitBlocks() uint64 { - if x != nil { - return x.SharedHitBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetSharedReadBlocks() uint64 { - if x != nil { - return x.SharedReadBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetSharedDirtiedBlocks() uint64 { - if x != nil { - return x.SharedDirtiedBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetSharedWrittenBlocks() uint64 { - if x != nil { - return x.SharedWrittenBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetLocalHitBlocks() uint64 { - if x != nil { - return x.LocalHitBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetLocalReadBlocks() uint64 { - if x != nil { - return x.LocalReadBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetLocalDirtiedBlocks() uint64 { - if x != nil { - return x.LocalDirtiedBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetLocalWrittenBlocks() uint64 { - if x != nil { - return x.LocalWrittenBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetTempReadBlocks() uint64 { - if x != nil { - return x.TempReadBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetTempWrittenBlocks() uint64 { - if x != nil { - return x.TempWrittenBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Plan) GetSortKey() []string { - if x != nil { - return x.SortKey - } - return nil -} - -func (x *PostgreSQLExplain_Plan) GetJoinType() string { - if x != nil { - return x.JoinType - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetInnerUnique() bool { - if x != nil { - return x.InnerUnique - } - return false -} - -func (x *PostgreSQLExplain_Plan) GetHashCond() string { - if x != nil { - return x.HashCond - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetIndexName() string { - if x != nil { - return x.IndexName - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetScanDirection() string { - if x != nil { - return x.ScanDirection - } - return "" -} - -func (x *PostgreSQLExplain_Plan) GetIndexCond() string { - if x != nil { - return x.IndexCond - } - return "" -} - -type PostgreSQLExplain_Planning struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SharedHitBlocks uint64 `protobuf:"varint,1,opt,name=shared_hit_blocks,json=Shared Hit Blocks,proto3" json:"shared_hit_blocks,omitempty"` - SharedReadBlocks uint64 `protobuf:"varint,2,opt,name=shared_read_blocks,json=Shared Read Blocks,proto3" json:"shared_read_blocks,omitempty"` - SharedDirtiedBlocks uint64 `protobuf:"varint,3,opt,name=shared_dirtied_blocks,json=Shared Dirtied Blocks,proto3" json:"shared_dirtied_blocks,omitempty"` - SharedWrittenBlocks uint64 `protobuf:"varint,4,opt,name=shared_written_blocks,json=Shared Written Blocks,proto3" json:"shared_written_blocks,omitempty"` - LocalHitBlocks uint64 `protobuf:"varint,5,opt,name=local_hit_blocks,json=Local Hit Blocks,proto3" json:"local_hit_blocks,omitempty"` - LocalReadBlocks uint64 `protobuf:"varint,6,opt,name=local_read_blocks,json=Local Read Blocks,proto3" json:"local_read_blocks,omitempty"` - LocalDirtiedBlocks uint64 `protobuf:"varint,7,opt,name=local_dirtied_blocks,json=Local Dirtied Blocks,proto3" json:"local_dirtied_blocks,omitempty"` - LocalWrittenBlocks uint64 `protobuf:"varint,8,opt,name=local_written_blocks,json=Local Written Blocks,proto3" json:"local_written_blocks,omitempty"` - TempReadBlocks uint64 `protobuf:"varint,9,opt,name=temp_read_blocks,json=Temp Read Blocks,proto3" json:"temp_read_blocks,omitempty"` - TempWrittenBlocks uint64 `protobuf:"varint,10,opt,name=temp_written_blocks,json=Temp Written Blocks,proto3" json:"temp_written_blocks,omitempty"` -} - -func (x *PostgreSQLExplain_Planning) Reset() { - *x = PostgreSQLExplain_Planning{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostgreSQLExplain_Planning) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostgreSQLExplain_Planning) ProtoMessage() {} - -func (x *PostgreSQLExplain_Planning) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostgreSQLExplain_Planning.ProtoReflect.Descriptor instead. -func (*PostgreSQLExplain_Planning) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{22, 2} -} - -func (x *PostgreSQLExplain_Planning) GetSharedHitBlocks() uint64 { - if x != nil { - return x.SharedHitBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetSharedReadBlocks() uint64 { - if x != nil { - return x.SharedReadBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetSharedDirtiedBlocks() uint64 { - if x != nil { - return x.SharedDirtiedBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetSharedWrittenBlocks() uint64 { - if x != nil { - return x.SharedWrittenBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetLocalHitBlocks() uint64 { - if x != nil { - return x.LocalHitBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetLocalReadBlocks() uint64 { - if x != nil { - return x.LocalReadBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetLocalDirtiedBlocks() uint64 { - if x != nil { - return x.LocalDirtiedBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetLocalWrittenBlocks() uint64 { - if x != nil { - return x.LocalWrittenBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetTempReadBlocks() uint64 { - if x != nil { - return x.TempReadBlocks - } - return 0 -} - -func (x *PostgreSQLExplain_Planning) GetTempWrittenBlocks() uint64 { - if x != nil { - return x.TempWrittenBlocks - } - return 0 -} - -type MySQLExplain_QueryBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SelectId uint64 `protobuf:"varint,1,opt,name=select_id,json=selectId,proto3" json:"select_id,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - CostInfo map[string]string `protobuf:"bytes,3,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Table *MySQLExplain_Table `protobuf:"bytes,4,opt,name=table,proto3" json:"table,omitempty"` - OrderingOperation *MySQLExplain_OrderingOperation `protobuf:"bytes,5,opt,name=ordering_operation,json=orderingOperation,proto3" json:"ordering_operation,omitempty"` - NestedLoop []*MySQLExplain_NestedLoopObj `protobuf:"bytes,6,rep,name=nested_loop,json=nestedLoop,proto3" json:"nested_loop,omitempty"` -} - -func (x *MySQLExplain_QueryBlock) Reset() { - *x = MySQLExplain_QueryBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQLExplain_QueryBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQLExplain_QueryBlock) ProtoMessage() {} - -func (x *MySQLExplain_QueryBlock) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQLExplain_QueryBlock.ProtoReflect.Descriptor instead. -func (*MySQLExplain_QueryBlock) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{24, 0} -} - -func (x *MySQLExplain_QueryBlock) GetSelectId() uint64 { - if x != nil { - return x.SelectId - } - return 0 -} - -func (x *MySQLExplain_QueryBlock) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *MySQLExplain_QueryBlock) GetCostInfo() map[string]string { - if x != nil { - return x.CostInfo - } - return nil -} - -func (x *MySQLExplain_QueryBlock) GetTable() *MySQLExplain_Table { - if x != nil { - return x.Table - } - return nil -} - -func (x *MySQLExplain_QueryBlock) GetOrderingOperation() *MySQLExplain_OrderingOperation { - if x != nil { - return x.OrderingOperation - } - return nil -} - -func (x *MySQLExplain_QueryBlock) GetNestedLoop() []*MySQLExplain_NestedLoopObj { - if x != nil { - return x.NestedLoop - } - return nil -} - -type MySQLExplain_Table struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` - AccessType string `protobuf:"bytes,2,opt,name=access_type,json=accessType,proto3" json:"access_type,omitempty"` - RowsExaminedPerScan uint64 `protobuf:"varint,3,opt,name=rows_examined_per_scan,json=rowsExaminedPerScan,proto3" json:"rows_examined_per_scan,omitempty"` - RowsProducedPerJoin uint64 `protobuf:"varint,4,opt,name=rows_produced_per_join,json=rowsProducedPerJoin,proto3" json:"rows_produced_per_join,omitempty"` - Filtered string `protobuf:"bytes,5,opt,name=filtered,proto3" json:"filtered,omitempty"` - CostInfo map[string]string `protobuf:"bytes,6,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - UsedColumns []string `protobuf:"bytes,7,rep,name=used_columns,json=usedColumns,proto3" json:"used_columns,omitempty"` - Insert bool `protobuf:"varint,8,opt,name=insert,proto3" json:"insert,omitempty"` - PossibleKeys []string `protobuf:"bytes,9,rep,name=possible_keys,json=possibleKeys,proto3" json:"possible_keys,omitempty"` - Key string `protobuf:"bytes,10,opt,name=key,proto3" json:"key,omitempty"` - UsedKeyParts []string `protobuf:"bytes,11,rep,name=used_key_parts,json=usedKeyParts,proto3" json:"used_key_parts,omitempty"` - KeyLength string `protobuf:"bytes,12,opt,name=key_length,json=keyLength,proto3" json:"key_length,omitempty"` - Ref []string `protobuf:"bytes,13,rep,name=ref,proto3" json:"ref,omitempty"` -} - -func (x *MySQLExplain_Table) Reset() { - *x = MySQLExplain_Table{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQLExplain_Table) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQLExplain_Table) ProtoMessage() {} - -func (x *MySQLExplain_Table) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQLExplain_Table.ProtoReflect.Descriptor instead. -func (*MySQLExplain_Table) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{24, 1} -} - -func (x *MySQLExplain_Table) GetTableName() string { - if x != nil { - return x.TableName - } - return "" -} - -func (x *MySQLExplain_Table) GetAccessType() string { - if x != nil { - return x.AccessType - } - return "" -} - -func (x *MySQLExplain_Table) GetRowsExaminedPerScan() uint64 { - if x != nil { - return x.RowsExaminedPerScan - } - return 0 -} - -func (x *MySQLExplain_Table) GetRowsProducedPerJoin() uint64 { - if x != nil { - return x.RowsProducedPerJoin - } - return 0 -} - -func (x *MySQLExplain_Table) GetFiltered() string { - if x != nil { - return x.Filtered - } - return "" -} - -func (x *MySQLExplain_Table) GetCostInfo() map[string]string { - if x != nil { - return x.CostInfo - } - return nil -} - -func (x *MySQLExplain_Table) GetUsedColumns() []string { - if x != nil { - return x.UsedColumns - } - return nil -} - -func (x *MySQLExplain_Table) GetInsert() bool { - if x != nil { - return x.Insert - } - return false -} - -func (x *MySQLExplain_Table) GetPossibleKeys() []string { - if x != nil { - return x.PossibleKeys - } - return nil -} - -func (x *MySQLExplain_Table) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *MySQLExplain_Table) GetUsedKeyParts() []string { - if x != nil { - return x.UsedKeyParts - } - return nil -} - -func (x *MySQLExplain_Table) GetKeyLength() string { - if x != nil { - return x.KeyLength - } - return "" -} - -func (x *MySQLExplain_Table) GetRef() []string { - if x != nil { - return x.Ref - } - return nil -} - -type MySQLExplain_NestedLoopObj struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Table *MySQLExplain_Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` -} - -func (x *MySQLExplain_NestedLoopObj) Reset() { - *x = MySQLExplain_NestedLoopObj{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQLExplain_NestedLoopObj) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQLExplain_NestedLoopObj) ProtoMessage() {} - -func (x *MySQLExplain_NestedLoopObj) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQLExplain_NestedLoopObj.ProtoReflect.Descriptor instead. -func (*MySQLExplain_NestedLoopObj) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{24, 2} -} - -func (x *MySQLExplain_NestedLoopObj) GetTable() *MySQLExplain_Table { - if x != nil { - return x.Table - } - return nil -} - -type MySQLExplain_OrderingOperation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UsingFilesort bool `protobuf:"varint,1,opt,name=using_filesort,json=usingFilesort,proto3" json:"using_filesort,omitempty"` - CostInfo map[string]string `protobuf:"bytes,2,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Table *MySQLExplain_Table `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` - NestedLoop []*MySQLExplain_NestedLoopObj `protobuf:"bytes,4,rep,name=nested_loop,json=nestedLoop,proto3" json:"nested_loop,omitempty"` -} - -func (x *MySQLExplain_OrderingOperation) Reset() { - *x = MySQLExplain_OrderingOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQLExplain_OrderingOperation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQLExplain_OrderingOperation) ProtoMessage() {} - -func (x *MySQLExplain_OrderingOperation) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQLExplain_OrderingOperation.ProtoReflect.Descriptor instead. -func (*MySQLExplain_OrderingOperation) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{24, 3} -} - -func (x *MySQLExplain_OrderingOperation) GetUsingFilesort() bool { - if x != nil { - return x.UsingFilesort - } - return false -} - -func (x *MySQLExplain_OrderingOperation) GetCostInfo() map[string]string { - if x != nil { - return x.CostInfo - } - return nil -} - -func (x *MySQLExplain_OrderingOperation) GetTable() *MySQLExplain_Table { - if x != nil { - return x.Table - } - return nil -} - -func (x *MySQLExplain_OrderingOperation) GetNestedLoop() []*MySQLExplain_NestedLoopObj { - if x != nil { - return x.NestedLoop - } - return nil -} - var File_plugin_codegen_proto protoreflect.FileDescriptor var file_plugin_codegen_proto_rawDesc = []byte{ @@ -3010,252 +1867,16 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x26, - 0x0a, 0x0c, 0x56, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x6f, 0x0a, 0x09, 0x56, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, - 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x08, 0x56, 0x65, 0x74, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x41, 0x0a, - 0x0a, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x33, 0x0a, 0x07, 0x65, - 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, - 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, - 0x22, 0x99, 0x0f, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, - 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6f, - 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, - 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, - 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x3e, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, - 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x96, 0x09, 0x0a, - 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x13, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x61, 0x72, - 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x20, 0x41, 0x77, 0x61, 0x72, - 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x20, - 0x43, 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x20, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, - 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, - 0x6c, 0x61, 0x6e, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x50, 0x6c, 0x61, 0x6e, 0x20, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, - 0x6e, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x50, - 0x6c, 0x61, 0x6e, 0x20, 0x57, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, - 0x52, 0x05, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, - 0x64, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x11, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x12, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, - 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x44, 0x69, 0x72, - 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, - 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, - 0x65, 0x64, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, - 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, - 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, - 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x54, - 0x65, 0x6d, 0x70, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, - 0x30, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x54, 0x65, - 0x6d, 0x70, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x18, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x20, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, - 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x20, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, - 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x1b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x48, 0x61, 0x73, 0x68, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, - 0x0e, 0x73, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x53, 0x63, 0x61, 0x6e, 0x20, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, - 0x6f, 0x6e, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x1a, 0xf4, 0x03, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x69, 0x74, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x53, - 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x53, 0x68, - 0x61, 0x72, 0x65, 0x64, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, - 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, - 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x57, 0x72, - 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x48, 0x69, - 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x44, 0x69, 0x72, 0x74, - 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, - 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, - 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x52, - 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x65, - 0x6d, 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x57, 0x72, - 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x37, 0x0a, 0x05, - 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x2e, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x65, 0x78, - 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0x91, 0x0b, 0x0a, 0x0c, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, - 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, - 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0a, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x9a, 0x03, 0x0a, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4a, - 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, - 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x55, 0x0a, 0x12, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, - 0x6f, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x52, 0x0a, 0x6e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x9a, 0x04, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x33, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, - 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x13, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x72, - 0x53, 0x63, 0x61, 0x6e, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x0c, - 0x75, 0x73, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x73, 0x69, - 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, - 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x50, - 0x61, 0x72, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x03, 0x72, 0x65, 0x66, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, - 0x4f, 0x62, 0x6a, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, - 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0xc1, 0x02, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, - 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x75, - 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x6f, - 0x72, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, - 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, - 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, - 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, - 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, - 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x7e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x79, 0x6c, 0x65, 0x63, 0x6f, 0x6e, 0x72, 0x6f, 0x79, 0x2f, 0x73, - 0x71, 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0xca, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7e, + 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, + 0x64, 0x65, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x79, 0x6c, 0x65, 0x63, 0x6f, 0x6e, + 0x72, 0x6f, 0x79, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, + 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3270,51 +1891,34 @@ func file_plugin_codegen_proto_rawDescGZIP() []byte { return file_plugin_codegen_proto_rawDescData } -var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_plugin_codegen_proto_goTypes = []interface{}{ - (*File)(nil), // 0: plugin.File - (*Override)(nil), // 1: plugin.Override - (*ParsedGoType)(nil), // 2: plugin.ParsedGoType - (*Settings)(nil), // 3: plugin.Settings - (*Codegen)(nil), // 4: plugin.Codegen - (*GoCode)(nil), // 5: plugin.GoCode - (*JSONCode)(nil), // 6: plugin.JSONCode - (*Catalog)(nil), // 7: plugin.Catalog - (*Schema)(nil), // 8: plugin.Schema - (*CompositeType)(nil), // 9: plugin.CompositeType - (*Enum)(nil), // 10: plugin.Enum - (*Table)(nil), // 11: plugin.Table - (*Identifier)(nil), // 12: plugin.Identifier - (*Column)(nil), // 13: plugin.Column - (*Query)(nil), // 14: plugin.Query - (*Parameter)(nil), // 15: plugin.Parameter - (*CodeGenRequest)(nil), // 16: plugin.CodeGenRequest - (*CodeGenResponse)(nil), // 17: plugin.CodeGenResponse - (*VetParameter)(nil), // 18: plugin.VetParameter - (*VetConfig)(nil), // 19: plugin.VetConfig - (*VetQuery)(nil), // 20: plugin.VetQuery - (*PostgreSQL)(nil), // 21: plugin.PostgreSQL - (*PostgreSQLExplain)(nil), // 22: plugin.PostgreSQLExplain - (*MySQL)(nil), // 23: plugin.MySQL - (*MySQLExplain)(nil), // 24: plugin.MySQLExplain - nil, // 25: plugin.ParsedGoType.StructTagsEntry - nil, // 26: plugin.Settings.RenameEntry - nil, // 27: plugin.PostgreSQLExplain.SettingsEntry - (*PostgreSQLExplain_Plan)(nil), // 28: plugin.PostgreSQLExplain.Plan - (*PostgreSQLExplain_Planning)(nil), // 29: plugin.PostgreSQLExplain.Planning - (*MySQLExplain_QueryBlock)(nil), // 30: plugin.MySQLExplain.QueryBlock - (*MySQLExplain_Table)(nil), // 31: plugin.MySQLExplain.Table - (*MySQLExplain_NestedLoopObj)(nil), // 32: plugin.MySQLExplain.NestedLoopObj - (*MySQLExplain_OrderingOperation)(nil), // 33: plugin.MySQLExplain.OrderingOperation - nil, // 34: plugin.MySQLExplain.QueryBlock.CostInfoEntry - nil, // 35: plugin.MySQLExplain.Table.CostInfoEntry - nil, // 36: plugin.MySQLExplain.OrderingOperation.CostInfoEntry + (*File)(nil), // 0: plugin.File + (*Override)(nil), // 1: plugin.Override + (*ParsedGoType)(nil), // 2: plugin.ParsedGoType + (*Settings)(nil), // 3: plugin.Settings + (*Codegen)(nil), // 4: plugin.Codegen + (*GoCode)(nil), // 5: plugin.GoCode + (*JSONCode)(nil), // 6: plugin.JSONCode + (*Catalog)(nil), // 7: plugin.Catalog + (*Schema)(nil), // 8: plugin.Schema + (*CompositeType)(nil), // 9: plugin.CompositeType + (*Enum)(nil), // 10: plugin.Enum + (*Table)(nil), // 11: plugin.Table + (*Identifier)(nil), // 12: plugin.Identifier + (*Column)(nil), // 13: plugin.Column + (*Query)(nil), // 14: plugin.Query + (*Parameter)(nil), // 15: plugin.Parameter + (*CodeGenRequest)(nil), // 16: plugin.CodeGenRequest + (*CodeGenResponse)(nil), // 17: plugin.CodeGenResponse + nil, // 18: plugin.ParsedGoType.StructTagsEntry + nil, // 19: plugin.Settings.RenameEntry } var file_plugin_codegen_proto_depIdxs = []int32{ 12, // 0: plugin.Override.table:type_name -> plugin.Identifier 2, // 1: plugin.Override.go_type:type_name -> plugin.ParsedGoType - 25, // 2: plugin.ParsedGoType.struct_tags:type_name -> plugin.ParsedGoType.StructTagsEntry - 26, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry + 18, // 2: plugin.ParsedGoType.struct_tags:type_name -> plugin.ParsedGoType.StructTagsEntry + 19, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry 1, // 4: plugin.Settings.overrides:type_name -> plugin.Override 4, // 5: plugin.Settings.codegen:type_name -> plugin.Codegen 5, // 6: plugin.Settings.go:type_name -> plugin.GoCode @@ -3336,28 +1940,11 @@ var file_plugin_codegen_proto_depIdxs = []int32{ 7, // 22: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog 14, // 23: plugin.CodeGenRequest.queries:type_name -> plugin.Query 0, // 24: plugin.CodeGenResponse.files:type_name -> plugin.File - 18, // 25: plugin.VetQuery.params:type_name -> plugin.VetParameter - 22, // 26: plugin.PostgreSQL.explain:type_name -> plugin.PostgreSQLExplain - 28, // 27: plugin.PostgreSQLExplain.plan:type_name -> plugin.PostgreSQLExplain.Plan - 27, // 28: plugin.PostgreSQLExplain.settings:type_name -> plugin.PostgreSQLExplain.SettingsEntry - 29, // 29: plugin.PostgreSQLExplain.planning:type_name -> plugin.PostgreSQLExplain.Planning - 24, // 30: plugin.MySQL.explain:type_name -> plugin.MySQLExplain - 30, // 31: plugin.MySQLExplain.query_block:type_name -> plugin.MySQLExplain.QueryBlock - 28, // 32: plugin.PostgreSQLExplain.Plan.plans:type_name -> plugin.PostgreSQLExplain.Plan - 34, // 33: plugin.MySQLExplain.QueryBlock.cost_info:type_name -> plugin.MySQLExplain.QueryBlock.CostInfoEntry - 31, // 34: plugin.MySQLExplain.QueryBlock.table:type_name -> plugin.MySQLExplain.Table - 33, // 35: plugin.MySQLExplain.QueryBlock.ordering_operation:type_name -> plugin.MySQLExplain.OrderingOperation - 32, // 36: plugin.MySQLExplain.QueryBlock.nested_loop:type_name -> plugin.MySQLExplain.NestedLoopObj - 35, // 37: plugin.MySQLExplain.Table.cost_info:type_name -> plugin.MySQLExplain.Table.CostInfoEntry - 31, // 38: plugin.MySQLExplain.NestedLoopObj.table:type_name -> plugin.MySQLExplain.Table - 36, // 39: plugin.MySQLExplain.OrderingOperation.cost_info:type_name -> plugin.MySQLExplain.OrderingOperation.CostInfoEntry - 31, // 40: plugin.MySQLExplain.OrderingOperation.table:type_name -> plugin.MySQLExplain.Table - 32, // 41: plugin.MySQLExplain.OrderingOperation.nested_loop:type_name -> plugin.MySQLExplain.NestedLoopObj - 42, // [42:42] is the sub-list for method output_type - 42, // [42:42] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_plugin_codegen_proto_init() } @@ -3582,162 +2169,6 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VetParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VetQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostgreSQL); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostgreSQLExplain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQL); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQLExplain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostgreSQLExplain_Plan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostgreSQLExplain_Planning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQLExplain_QueryBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQLExplain_Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQLExplain_NestedLoopObj); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQLExplain_OrderingOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_plugin_codegen_proto_msgTypes[5].OneofWrappers = []interface{}{} type x struct{} @@ -3746,7 +2177,7 @@ func file_plugin_codegen_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, - NumMessages: 37, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go index 3fe441dfbb..c2728bf8d5 100644 --- a/internal/plugin/codegen_vtproto.pb.go +++ b/internal/plugin/codegen_vtproto.pb.go @@ -5,12 +5,10 @@ package plugin import ( - binary "encoding/binary" fmt "fmt" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" - math "math" bits "math/bits" ) @@ -541,386 +539,6 @@ func (m *CodeGenResponse) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *VetParameter) CloneVT() *VetParameter { - if m == nil { - return (*VetParameter)(nil) - } - r := &VetParameter{ - Number: m.Number, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *VetParameter) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *VetConfig) CloneVT() *VetConfig { - if m == nil { - return (*VetConfig)(nil) - } - r := &VetConfig{ - Version: m.Version, - Engine: m.Engine, - } - if rhs := m.Schema; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Schema = tmpContainer - } - if rhs := m.Queries; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Queries = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *VetConfig) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *VetQuery) CloneVT() *VetQuery { - if m == nil { - return (*VetQuery)(nil) - } - r := &VetQuery{ - Sql: m.Sql, - Name: m.Name, - Cmd: m.Cmd, - } - if rhs := m.Params; rhs != nil { - tmpContainer := make([]*VetParameter, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Params = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *VetQuery) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *PostgreSQL) CloneVT() *PostgreSQL { - if m == nil { - return (*PostgreSQL)(nil) - } - r := &PostgreSQL{ - Explain: m.Explain.CloneVT(), - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *PostgreSQL) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *PostgreSQLExplain_Plan) CloneVT() *PostgreSQLExplain_Plan { - if m == nil { - return (*PostgreSQLExplain_Plan)(nil) - } - r := &PostgreSQLExplain_Plan{ - NodeType: m.NodeType, - ParentRelationship: m.ParentRelationship, - RelationName: m.RelationName, - Schema: m.Schema, - Alias: m.Alias, - ParallelAware: m.ParallelAware, - AsyncCapable: m.AsyncCapable, - StartupCost: m.StartupCost, - TotalCost: m.TotalCost, - PlanRows: m.PlanRows, - PlanWidth: m.PlanWidth, - SharedHitBlocks: m.SharedHitBlocks, - SharedReadBlocks: m.SharedReadBlocks, - SharedDirtiedBlocks: m.SharedDirtiedBlocks, - SharedWrittenBlocks: m.SharedWrittenBlocks, - LocalHitBlocks: m.LocalHitBlocks, - LocalReadBlocks: m.LocalReadBlocks, - LocalDirtiedBlocks: m.LocalDirtiedBlocks, - LocalWrittenBlocks: m.LocalWrittenBlocks, - TempReadBlocks: m.TempReadBlocks, - TempWrittenBlocks: m.TempWrittenBlocks, - JoinType: m.JoinType, - InnerUnique: m.InnerUnique, - HashCond: m.HashCond, - IndexName: m.IndexName, - ScanDirection: m.ScanDirection, - IndexCond: m.IndexCond, - } - if rhs := m.Output; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Output = tmpContainer - } - if rhs := m.Plans; rhs != nil { - tmpContainer := make([]*PostgreSQLExplain_Plan, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Plans = tmpContainer - } - if rhs := m.SortKey; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.SortKey = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *PostgreSQLExplain_Plan) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *PostgreSQLExplain_Planning) CloneVT() *PostgreSQLExplain_Planning { - if m == nil { - return (*PostgreSQLExplain_Planning)(nil) - } - r := &PostgreSQLExplain_Planning{ - SharedHitBlocks: m.SharedHitBlocks, - SharedReadBlocks: m.SharedReadBlocks, - SharedDirtiedBlocks: m.SharedDirtiedBlocks, - SharedWrittenBlocks: m.SharedWrittenBlocks, - LocalHitBlocks: m.LocalHitBlocks, - LocalReadBlocks: m.LocalReadBlocks, - LocalDirtiedBlocks: m.LocalDirtiedBlocks, - LocalWrittenBlocks: m.LocalWrittenBlocks, - TempReadBlocks: m.TempReadBlocks, - TempWrittenBlocks: m.TempWrittenBlocks, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *PostgreSQLExplain_Planning) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *PostgreSQLExplain) CloneVT() *PostgreSQLExplain { - if m == nil { - return (*PostgreSQLExplain)(nil) - } - r := &PostgreSQLExplain{ - Plan: m.Plan.CloneVT(), - Planning: m.Planning.CloneVT(), - } - if rhs := m.Settings; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.Settings = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *PostgreSQLExplain) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MySQL) CloneVT() *MySQL { - if m == nil { - return (*MySQL)(nil) - } - r := &MySQL{ - Explain: m.Explain.CloneVT(), - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MySQL) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MySQLExplain_QueryBlock) CloneVT() *MySQLExplain_QueryBlock { - if m == nil { - return (*MySQLExplain_QueryBlock)(nil) - } - r := &MySQLExplain_QueryBlock{ - SelectId: m.SelectId, - Message: m.Message, - Table: m.Table.CloneVT(), - OrderingOperation: m.OrderingOperation.CloneVT(), - } - if rhs := m.CostInfo; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.CostInfo = tmpContainer - } - if rhs := m.NestedLoop; rhs != nil { - tmpContainer := make([]*MySQLExplain_NestedLoopObj, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.NestedLoop = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MySQLExplain_QueryBlock) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MySQLExplain_Table) CloneVT() *MySQLExplain_Table { - if m == nil { - return (*MySQLExplain_Table)(nil) - } - r := &MySQLExplain_Table{ - TableName: m.TableName, - AccessType: m.AccessType, - RowsExaminedPerScan: m.RowsExaminedPerScan, - RowsProducedPerJoin: m.RowsProducedPerJoin, - Filtered: m.Filtered, - Insert: m.Insert, - Key: m.Key, - KeyLength: m.KeyLength, - } - if rhs := m.CostInfo; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.CostInfo = tmpContainer - } - if rhs := m.UsedColumns; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.UsedColumns = tmpContainer - } - if rhs := m.PossibleKeys; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.PossibleKeys = tmpContainer - } - if rhs := m.UsedKeyParts; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.UsedKeyParts = tmpContainer - } - if rhs := m.Ref; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Ref = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MySQLExplain_Table) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MySQLExplain_NestedLoopObj) CloneVT() *MySQLExplain_NestedLoopObj { - if m == nil { - return (*MySQLExplain_NestedLoopObj)(nil) - } - r := &MySQLExplain_NestedLoopObj{ - Table: m.Table.CloneVT(), - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MySQLExplain_NestedLoopObj) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MySQLExplain_OrderingOperation) CloneVT() *MySQLExplain_OrderingOperation { - if m == nil { - return (*MySQLExplain_OrderingOperation)(nil) - } - r := &MySQLExplain_OrderingOperation{ - UsingFilesort: m.UsingFilesort, - Table: m.Table.CloneVT(), - } - if rhs := m.CostInfo; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.CostInfo = tmpContainer - } - if rhs := m.NestedLoop; rhs != nil { - tmpContainer := make([]*MySQLExplain_NestedLoopObj, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.NestedLoop = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MySQLExplain_OrderingOperation) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MySQLExplain) CloneVT() *MySQLExplain { - if m == nil { - return (*MySQLExplain)(nil) - } - r := &MySQLExplain{ - QueryBlock: m.QueryBlock.CloneVT(), - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MySQLExplain) CloneMessageVT() proto.Message { - return m.CloneVT() -} - func (this *File) EqualVT(that *File) bool { if this == that { return true @@ -1721,641 +1339,420 @@ func (this *CodeGenResponse) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } -func (this *VetParameter) EqualVT(that *VetParameter) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false +func (m *File) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if this.Number != that.Number { - return false + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return string(this.unknownFields) == string(that.unknownFields) + return dAtA[:n], nil } -func (this *VetParameter) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*VetParameter) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *VetConfig) EqualVT(that *VetConfig) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Version != that.Version { - return false - } - if this.Engine != that.Engine { - return false - } - if len(this.Schema) != len(that.Schema) { - return false - } - for i, vx := range this.Schema { - vy := that.Schema[i] - if vx != vy { - return false - } - } - if len(this.Queries) != len(that.Queries) { - return false - } - for i, vx := range this.Queries { - vy := that.Queries[i] - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) +func (m *File) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (this *VetConfig) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*VetConfig) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *VetQuery) EqualVT(that *VetQuery) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Sql != that.Sql { - return false - } - if this.Name != that.Name { - return false +func (m *File) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if this.Cmd != that.Cmd { - return false + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(this.Params) != len(that.Params) { - return false + if len(m.Contents) > 0 { + i -= len(m.Contents) + copy(dAtA[i:], m.Contents) + i = encodeVarint(dAtA, i, uint64(len(m.Contents))) + i-- + dAtA[i] = 0x12 } - for i, vx := range this.Params { - vy := that.Params[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &VetParameter{} - } - if q == nil { - q = &VetParameter{} - } - if !p.EqualVT(q) { - return false - } - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return string(this.unknownFields) == string(that.unknownFields) + return len(dAtA) - i, nil } -func (this *VetQuery) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*VetQuery) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *PostgreSQL) EqualVT(that *PostgreSQL) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false +func (m *Override) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if !this.Explain.EqualVT(that.Explain) { - return false + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return string(this.unknownFields) == string(that.unknownFields) + return dAtA[:n], nil } -func (this *PostgreSQL) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*PostgreSQL) - if !ok { - return false - } - return this.EqualVT(that) +func (m *Override) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (this *PostgreSQLExplain_Plan) EqualVT(that *PostgreSQLExplain_Plan) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.NodeType != that.NodeType { - return false - } - if this.ParentRelationship != that.ParentRelationship { - return false - } - if this.RelationName != that.RelationName { - return false - } - if this.Schema != that.Schema { - return false - } - if this.Alias != that.Alias { - return false - } - if this.ParallelAware != that.ParallelAware { - return false - } - if this.AsyncCapable != that.AsyncCapable { - return false - } - if this.StartupCost != that.StartupCost { - return false - } - if this.TotalCost != that.TotalCost { - return false - } - if this.PlanRows != that.PlanRows { - return false + +func (m *Override) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if this.PlanWidth != that.PlanWidth { - return false + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(this.Output) != len(that.Output) { - return false + if m.Unsigned { + i-- + if m.Unsigned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 } - for i, vx := range this.Output { - vy := that.Output[i] - if vx != vy { - return false + if m.GoType != nil { + size, err := m.GoType.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 } - if len(this.Plans) != len(that.Plans) { - return false + if len(m.ColumnName) > 0 { + i -= len(m.ColumnName) + copy(dAtA[i:], m.ColumnName) + i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) + i-- + dAtA[i] = 0x42 } - for i, vx := range this.Plans { - vy := that.Plans[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &PostgreSQLExplain_Plan{} - } - if q == nil { - q = &PostgreSQLExplain_Plan{} - } - if !p.EqualVT(q) { - return false - } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - if this.SharedHitBlocks != that.SharedHitBlocks { - return false + if len(m.Column) > 0 { + i -= len(m.Column) + copy(dAtA[i:], m.Column) + i = encodeVarint(dAtA, i, uint64(len(m.Column))) + i-- + dAtA[i] = 0x32 } - if this.SharedReadBlocks != that.SharedReadBlocks { - return false + if m.Nullable { + i-- + if m.Nullable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { - return false + if len(m.DbType) > 0 { + i -= len(m.DbType) + copy(dAtA[i:], m.DbType) + i = encodeVarint(dAtA, i, uint64(len(m.DbType))) + i-- + dAtA[i] = 0x1a } - if this.SharedWrittenBlocks != that.SharedWrittenBlocks { - return false + if len(m.CodeType) > 0 { + i -= len(m.CodeType) + copy(dAtA[i:], m.CodeType) + i = encodeVarint(dAtA, i, uint64(len(m.CodeType))) + i-- + dAtA[i] = 0xa } - if this.LocalHitBlocks != that.LocalHitBlocks { - return false + return len(dAtA) - i, nil +} + +func (m *ParsedGoType) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if this.LocalReadBlocks != that.LocalReadBlocks { - return false + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { - return false + return dAtA[:n], nil +} + +func (m *ParsedGoType) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedGoType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if this.LocalWrittenBlocks != that.LocalWrittenBlocks { - return false + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if this.TempReadBlocks != that.TempReadBlocks { - return false - } - if this.TempWrittenBlocks != that.TempWrittenBlocks { - return false - } - if len(this.SortKey) != len(that.SortKey) { - return false - } - for i, vx := range this.SortKey { - vy := that.SortKey[i] - if vx != vy { - return false + if len(m.StructTags) > 0 { + for k := range m.StructTags { + v := m.StructTags[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } } - if this.JoinType != that.JoinType { - return false + if m.BasicType { + i-- + if m.BasicType { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 } - if this.InnerUnique != that.InnerUnique { - return false + if len(m.TypeName) > 0 { + i -= len(m.TypeName) + copy(dAtA[i:], m.TypeName) + i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) + i-- + dAtA[i] = 0x1a } - if this.HashCond != that.HashCond { - return false + if len(m.Package) > 0 { + i -= len(m.Package) + copy(dAtA[i:], m.Package) + i = encodeVarint(dAtA, i, uint64(len(m.Package))) + i-- + dAtA[i] = 0x12 } - if this.IndexName != that.IndexName { - return false + if len(m.ImportPath) > 0 { + i -= len(m.ImportPath) + copy(dAtA[i:], m.ImportPath) + i = encodeVarint(dAtA, i, uint64(len(m.ImportPath))) + i-- + dAtA[i] = 0xa } - if this.ScanDirection != that.ScanDirection { - return false + return len(dAtA) - i, nil +} + +func (m *Settings) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if this.IndexCond != that.IndexCond { - return false + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return string(this.unknownFields) == string(that.unknownFields) + return dAtA[:n], nil } -func (this *PostgreSQLExplain_Plan) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*PostgreSQLExplain_Plan) - if !ok { - return false - } - return this.EqualVT(that) +func (m *Settings) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (this *PostgreSQLExplain_Planning) EqualVT(that *PostgreSQLExplain_Planning) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if this.SharedHitBlocks != that.SharedHitBlocks { - return false + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if this.SharedReadBlocks != that.SharedReadBlocks { - return false + if m.Codegen != nil { + size, err := m.Codegen.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 } - if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { - return false + if m.Json != nil { + size, err := m.Json.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a } - if this.SharedWrittenBlocks != that.SharedWrittenBlocks { - return false + if m.Go != nil { + size, err := m.Go.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 } - if this.LocalHitBlocks != that.LocalHitBlocks { - return false + if len(m.Overrides) > 0 { + for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Overrides[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } } - if this.LocalReadBlocks != that.LocalReadBlocks { - return false + if len(m.Rename) > 0 { + for k := range m.Rename { + v := m.Rename[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } } - if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { - return false + if len(m.Queries) > 0 { + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Queries[iNdEx]) + copy(dAtA[i:], m.Queries[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - if this.LocalWrittenBlocks != that.LocalWrittenBlocks { - return false + if len(m.Schema) > 0 { + for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Schema[iNdEx]) + copy(dAtA[i:], m.Schema[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } - if this.TempReadBlocks != that.TempReadBlocks { - return false + if len(m.Engine) > 0 { + i -= len(m.Engine) + copy(dAtA[i:], m.Engine) + i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + i-- + dAtA[i] = 0x12 } - if this.TempWrittenBlocks != that.TempWrittenBlocks { - return false + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa } - return string(this.unknownFields) == string(that.unknownFields) + return len(dAtA) - i, nil } -func (this *PostgreSQLExplain_Planning) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*PostgreSQLExplain_Planning) - if !ok { - return false +func (m *Codegen) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - return this.EqualVT(that) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (this *PostgreSQLExplain) EqualVT(that *PostgreSQLExplain) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *Codegen) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if !this.Plan.EqualVT(that.Plan) { - return false + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(this.Settings) != len(that.Settings) { - return false + if len(m.Options) > 0 { + i -= len(m.Options) + copy(dAtA[i:], m.Options) + i = encodeVarint(dAtA, i, uint64(len(m.Options))) + i-- + dAtA[i] = 0x1a } - for i, vx := range this.Settings { - vy, ok := that.Settings[i] - if !ok { - return false - } - if vx != vy { - return false - } + if len(m.Plugin) > 0 { + i -= len(m.Plugin) + copy(dAtA[i:], m.Plugin) + i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) + i-- + dAtA[i] = 0x12 } - if !this.Planning.EqualVT(that.Planning) { - return false + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) + i-- + dAtA[i] = 0xa } - return string(this.unknownFields) == string(that.unknownFields) + return len(dAtA) - i, nil } -func (this *PostgreSQLExplain) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*PostgreSQLExplain) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MySQL) EqualVT(that *MySQL) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.Explain.EqualVT(that.Explain) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MySQL) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MySQL) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MySQLExplain_QueryBlock) EqualVT(that *MySQLExplain_QueryBlock) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SelectId != that.SelectId { - return false - } - if this.Message != that.Message { - return false - } - if len(this.CostInfo) != len(that.CostInfo) { - return false - } - for i, vx := range this.CostInfo { - vy, ok := that.CostInfo[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if !this.Table.EqualVT(that.Table) { - return false - } - if !this.OrderingOperation.EqualVT(that.OrderingOperation) { - return false - } - if len(this.NestedLoop) != len(that.NestedLoop) { - return false - } - for i, vx := range this.NestedLoop { - vy := that.NestedLoop[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &MySQLExplain_NestedLoopObj{} - } - if q == nil { - q = &MySQLExplain_NestedLoopObj{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MySQLExplain_QueryBlock) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MySQLExplain_QueryBlock) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MySQLExplain_Table) EqualVT(that *MySQLExplain_Table) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.TableName != that.TableName { - return false - } - if this.AccessType != that.AccessType { - return false - } - if this.RowsExaminedPerScan != that.RowsExaminedPerScan { - return false - } - if this.RowsProducedPerJoin != that.RowsProducedPerJoin { - return false - } - if this.Filtered != that.Filtered { - return false - } - if len(this.CostInfo) != len(that.CostInfo) { - return false - } - for i, vx := range this.CostInfo { - vy, ok := that.CostInfo[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if len(this.UsedColumns) != len(that.UsedColumns) { - return false - } - for i, vx := range this.UsedColumns { - vy := that.UsedColumns[i] - if vx != vy { - return false - } - } - if this.Insert != that.Insert { - return false - } - if len(this.PossibleKeys) != len(that.PossibleKeys) { - return false - } - for i, vx := range this.PossibleKeys { - vy := that.PossibleKeys[i] - if vx != vy { - return false - } - } - if this.Key != that.Key { - return false - } - if len(this.UsedKeyParts) != len(that.UsedKeyParts) { - return false - } - for i, vx := range this.UsedKeyParts { - vy := that.UsedKeyParts[i] - if vx != vy { - return false - } - } - if this.KeyLength != that.KeyLength { - return false - } - if len(this.Ref) != len(that.Ref) { - return false - } - for i, vx := range this.Ref { - vy := that.Ref[i] - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MySQLExplain_Table) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MySQLExplain_Table) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MySQLExplain_NestedLoopObj) EqualVT(that *MySQLExplain_NestedLoopObj) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.Table.EqualVT(that.Table) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MySQLExplain_NestedLoopObj) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MySQLExplain_NestedLoopObj) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MySQLExplain_OrderingOperation) EqualVT(that *MySQLExplain_OrderingOperation) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.UsingFilesort != that.UsingFilesort { - return false - } - if len(this.CostInfo) != len(that.CostInfo) { - return false - } - for i, vx := range this.CostInfo { - vy, ok := that.CostInfo[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if !this.Table.EqualVT(that.Table) { - return false - } - if len(this.NestedLoop) != len(that.NestedLoop) { - return false - } - for i, vx := range this.NestedLoop { - vy := that.NestedLoop[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &MySQLExplain_NestedLoopObj{} - } - if q == nil { - q = &MySQLExplain_NestedLoopObj{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MySQLExplain_OrderingOperation) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MySQLExplain_OrderingOperation) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MySQLExplain) EqualVT(that *MySQLExplain) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.QueryBlock.EqualVT(that.QueryBlock) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MySQLExplain) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MySQLExplain) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *File) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *File) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *File) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Contents) > 0 { - i -= len(m.Contents) - copy(dAtA[i:], m.Contents) - i = encodeVarint(dAtA, i, uint64(len(m.Contents))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Override) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil +func (m *GoCode) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) @@ -2366,12 +1763,12 @@ func (m *Override) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Override) MarshalToVT(dAtA []byte) (int, error) { +func (m *GoCode) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Override) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2383,287 +1780,268 @@ func (m *Override) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Unsigned { + if m.OmitUnusedStructs { i-- - if m.Unsigned { + if m.OmitUnusedStructs { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x58 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 } - if m.GoType != nil { - size, err := m.GoType.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if m.JsonTagsIdUppercase { + i-- + if m.JsonTagsIdUppercase { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 } - if len(m.ColumnName) > 0 { - i -= len(m.ColumnName) - copy(dAtA[i:], m.ColumnName) - i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) + if len(m.SqlDriver) > 0 { + i -= len(m.SqlDriver) + copy(dAtA[i:], m.SqlDriver) + i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.OutputBatchFileName) > 0 { + i -= len(m.OutputBatchFileName) + copy(dAtA[i:], m.OutputBatchFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 } - if len(m.Column) > 0 { - i -= len(m.Column) - copy(dAtA[i:], m.Column) - i = encodeVarint(dAtA, i, uint64(len(m.Column))) + if m.QueryParameterLimit != nil { + i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 } - if m.Nullable { + if m.EmitPointersForNullTypes { i-- - if m.Nullable { + if m.EmitPointersForNullTypes { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x28 - } - if len(m.DbType) > 0 { - i -= len(m.DbType) - copy(dAtA[i:], m.DbType) - i = encodeVarint(dAtA, i, uint64(len(m.DbType))) - i-- - dAtA[i] = 0x1a - } - if len(m.CodeType) > 0 { - i -= len(m.CodeType) - copy(dAtA[i:], m.CodeType) - i = encodeVarint(dAtA, i, uint64(len(m.CodeType))) + dAtA[i] = 0x1 i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ParsedGoType) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ParsedGoType) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ParsedGoType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + dAtA[i] = 0xb0 } - if len(m.StructTags) > 0 { - for k := range m.StructTags { - v := m.StructTags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + if len(m.InflectionExcludeTableNames) > 0 { + for iNdEx := len(m.InflectionExcludeTableNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.InflectionExcludeTableNames[iNdEx]) + copy(dAtA[i:], m.InflectionExcludeTableNames[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.InflectionExcludeTableNames[iNdEx]))) i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + dAtA[i] = 0x1 i-- - dAtA[i] = 0x2a + dAtA[i] = 0xaa } } - if m.BasicType { + if m.EmitAllEnumValues { i-- - if m.BasicType { + if m.EmitAllEnumValues { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x20 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 } - if len(m.TypeName) > 0 { - i -= len(m.TypeName) - copy(dAtA[i:], m.TypeName) - i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) + if m.EmitEnumValidMethod { i-- - dAtA[i] = 0x1a + if m.EmitEnumValidMethod { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = encodeVarint(dAtA, i, uint64(len(m.Package))) + if len(m.OutputFilesSuffix) > 0 { + i -= len(m.OutputFilesSuffix) + copy(dAtA[i:], m.OutputFilesSuffix) + i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 } - if len(m.ImportPath) > 0 { - i -= len(m.ImportPath) - copy(dAtA[i:], m.ImportPath) - i = encodeVarint(dAtA, i, uint64(len(m.ImportPath))) + if len(m.OutputQuerierFileName) > 0 { + i -= len(m.OutputQuerierFileName) + copy(dAtA[i:], m.OutputQuerierFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a } - return len(dAtA) - i, nil -} - -func (m *Settings) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if len(m.OutputModelsFileName) > 0 { + i -= len(m.OutputModelsFileName) + copy(dAtA[i:], m.OutputModelsFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if len(m.OutputDbFileName) > 0 { + i -= len(m.OutputDbFileName) + copy(dAtA[i:], m.OutputDbFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) + i-- + dAtA[i] = 0x7a } - return dAtA[:n], nil -} - -func (m *Settings) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if len(m.SqlPackage) > 0 { + i -= len(m.SqlPackage) + copy(dAtA[i:], m.SqlPackage) + i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) + i-- + dAtA[i] = 0x72 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) + i-- + dAtA[i] = 0x6a } - if m.Codegen != nil { - size, err := m.Codegen.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Package) > 0 { + i -= len(m.Package) + copy(dAtA[i:], m.Package) + i = encodeVarint(dAtA, i, uint64(len(m.Package))) i-- dAtA[i] = 0x62 } - if m.Json != nil { - size, err := m.Json.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.JsonTagsCaseStyle) > 0 { + i -= len(m.JsonTagsCaseStyle) + copy(dAtA[i:], m.JsonTagsCaseStyle) + i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) i-- dAtA[i] = 0x5a } - if m.Go != nil { - size, err := m.Go.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if m.EmitMethodsWithDbArgument { i-- - dAtA[i] = 0x52 + if m.EmitMethodsWithDbArgument { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 } - if len(m.Overrides) > 0 { - for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Overrides[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 + if m.EmitParamsStructPointers { + i-- + if m.EmitParamsStructPointers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x48 } - if len(m.Rename) > 0 { - for k := range m.Rename { - v := m.Rename[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a + if m.EmitResultStructPointers { + i-- + if m.EmitResultStructPointers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x40 } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Queries[iNdEx]) - copy(dAtA[i:], m.Queries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) - i-- - dAtA[i] = 0x22 + if m.EmitExportedQueries { + i-- + if m.EmitExportedQueries { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x38 } - if len(m.Schema) > 0 { - for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Schema[iNdEx]) - copy(dAtA[i:], m.Schema[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) - i-- - dAtA[i] = 0x1a + if m.EmitEmptySlices { + i-- + if m.EmitEmptySlices { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x30 } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + if m.EmitExactTableNames { i-- - dAtA[i] = 0x12 + if m.EmitExactTableNames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + if m.EmitPreparedQueries { i-- - dAtA[i] = 0xa + if m.EmitPreparedQueries { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.EmitDbTags { + i-- + if m.EmitDbTags { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.EmitJsonTags { + i-- + if m.EmitJsonTags { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.EmitInterface { + i-- + if m.EmitInterface { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Codegen) MarshalVT() (dAtA []byte, err error) { +func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2676,12 +2054,12 @@ func (m *Codegen) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Codegen) MarshalToVT(dAtA []byte) (int, error) { +func (m *JSONCode) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2693,17 +2071,17 @@ func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Options) > 0 { - i -= len(m.Options) - copy(dAtA[i:], m.Options) - i = encodeVarint(dAtA, i, uint64(len(m.Options))) + if len(m.Filename) > 0 { + i -= len(m.Filename) + copy(dAtA[i:], m.Filename) + i = encodeVarint(dAtA, i, uint64(len(m.Filename))) i-- dAtA[i] = 0x1a } - if len(m.Plugin) > 0 { - i -= len(m.Plugin) - copy(dAtA[i:], m.Plugin) - i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) + if len(m.Indent) > 0 { + i -= len(m.Indent) + copy(dAtA[i:], m.Indent) + i = encodeVarint(dAtA, i, uint64(len(m.Indent))) i-- dAtA[i] = 0x12 } @@ -2717,7 +2095,7 @@ func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GoCode) MarshalVT() (dAtA []byte, err error) { +func (m *Catalog) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2730,12 +2108,12 @@ func (m *GoCode) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GoCode) MarshalToVT(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2747,268 +2125,126 @@ func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.OmitUnusedStructs { - i-- - if m.OmitUnusedStructs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Schemas) > 0 { + for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Schemas[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 } - if m.JsonTagsIdUppercase { - i-- - if m.JsonTagsIdUppercase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0xd0 + dAtA[i] = 0x1a } - if len(m.SqlDriver) > 0 { - i -= len(m.SqlDriver) - copy(dAtA[i:], m.SqlDriver) - i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) - i-- - dAtA[i] = 0x1 + if len(m.DefaultSchema) > 0 { + i -= len(m.DefaultSchema) + copy(dAtA[i:], m.DefaultSchema) + i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) i-- - dAtA[i] = 0xca + dAtA[i] = 0x12 } - if len(m.OutputBatchFileName) > 0 { - i -= len(m.OutputBatchFileName) - copy(dAtA[i:], m.OutputBatchFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) - i-- - dAtA[i] = 0x1 + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0xc2 + dAtA[i] = 0xa } - if m.QueryParameterLimit != nil { - i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 + return len(dAtA) - i, nil +} + +func (m *Schema) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.EmitPointersForNullTypes { - i-- - if m.EmitPointersForNullTypes { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.InflectionExcludeTableNames) > 0 { - for iNdEx := len(m.InflectionExcludeTableNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.InflectionExcludeTableNames[iNdEx]) - copy(dAtA[i:], m.InflectionExcludeTableNames[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.InflectionExcludeTableNames[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - } - if m.EmitAllEnumValues { - i-- - if m.EmitAllEnumValues { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.EmitEnumValidMethod { - i-- - if m.EmitEnumValidMethod { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if len(m.OutputFilesSuffix) > 0 { - i -= len(m.OutputFilesSuffix) - copy(dAtA[i:], m.OutputFilesSuffix) - i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(m.OutputQuerierFileName) > 0 { - i -= len(m.OutputQuerierFileName) - copy(dAtA[i:], m.OutputQuerierFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(m.OutputModelsFileName) > 0 { - i -= len(m.OutputModelsFileName) - copy(dAtA[i:], m.OutputModelsFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if len(m.OutputDbFileName) > 0 { - i -= len(m.OutputDbFileName) - copy(dAtA[i:], m.OutputDbFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) - i-- - dAtA[i] = 0x7a - } - if len(m.SqlPackage) > 0 { - i -= len(m.SqlPackage) - copy(dAtA[i:], m.SqlPackage) - i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) - i-- - dAtA[i] = 0x72 - } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0x6a - } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = encodeVarint(dAtA, i, uint64(len(m.Package))) - i-- - dAtA[i] = 0x62 - } - if len(m.JsonTagsCaseStyle) > 0 { - i -= len(m.JsonTagsCaseStyle) - copy(dAtA[i:], m.JsonTagsCaseStyle) - i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) - i-- - dAtA[i] = 0x5a - } - if m.EmitMethodsWithDbArgument { - i-- - if m.EmitMethodsWithDbArgument { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.EmitParamsStructPointers { - i-- - if m.EmitParamsStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.EmitResultStructPointers { - i-- - if m.EmitResultStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.EmitExportedQueries { - i-- - if m.EmitExportedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 + return dAtA[:n], nil +} + +func (m *Schema) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Schema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.EmitEmptySlices { - i-- - if m.EmitEmptySlices { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.EmitExactTableNames { - i-- - if m.EmitExactTableNames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.CompositeTypes) > 0 { + for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - i-- - dAtA[i] = 0x28 } - if m.EmitPreparedQueries { - i-- - if m.EmitPreparedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Enums) > 0 { + for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Enums[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x20 } - if m.EmitDbTags { - i-- - if m.EmitDbTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Tables) > 0 { + for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tables[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x18 } - if m.EmitJsonTags { - i-- - if m.EmitJsonTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.EmitInterface { - i-- - if m.EmitInterface { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { +func (m *CompositeType) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3021,12 +2257,12 @@ func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JSONCode) MarshalToVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3038,213 +2274,10 @@ func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x1a - } - if len(m.Indent) > 0 { - i -= len(m.Indent) - copy(dAtA[i:], m.Indent) - i = encodeVarint(dAtA, i, uint64(len(m.Indent))) - i-- - dAtA[i] = 0x12 - } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Catalog) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Catalog) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Schemas) > 0 { - for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Schemas[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.DefaultSchema) > 0 { - i -= len(m.DefaultSchema) - copy(dAtA[i:], m.DefaultSchema) - i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Schema) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Schema) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Schema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.CompositeTypes) > 0 { - for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Enums) > 0 { - for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Enums[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Tables) > 0 { - for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Tables[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CompositeType) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CompositeType) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0x12 } @@ -3871,25 +2904,36 @@ func (m *CodeGenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *VetParameter) MarshalVT() (dAtA []byte, err error) { +func encodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= sov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *File) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *VetParameter) MarshalToVT(dAtA []byte) (int, error) { +func (m *File) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *VetParameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *File) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3901,33 +2945,42 @@ func (m *VetParameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Number != 0 { - i = encodeVarint(dAtA, i, uint64(m.Number)) + if len(m.Contents) > 0 { + i -= len(m.Contents) + copy(dAtA[i:], m.Contents) + i = encodeVarint(dAtA, i, uint64(len(m.Contents))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *VetConfig) MarshalVT() (dAtA []byte, err error) { +func (m *Override) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *VetConfig) MarshalToVT(dAtA []byte) (int, error) { +func (m *Override) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *VetConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Override) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3939,60 +2992,96 @@ func (m *VetConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Queries[iNdEx]) - copy(dAtA[i:], m.Queries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) - i-- - dAtA[i] = 0x22 + if m.Unsigned { + i-- + if m.Unsigned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x58 } - if len(m.Schema) > 0 { - for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Schema[iNdEx]) - copy(dAtA[i:], m.Schema[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) - i-- - dAtA[i] = 0x1a + if m.GoType != nil { + size, err := m.GoType.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + if len(m.ColumnName) > 0 { + i -= len(m.ColumnName) + copy(dAtA[i:], m.ColumnName) + i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x42 } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.Column) > 0 { + i -= len(m.Column) + copy(dAtA[i:], m.Column) + i = encodeVarint(dAtA, i, uint64(len(m.Column))) + i-- + dAtA[i] = 0x32 + } + if m.Nullable { + i-- + if m.Nullable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.DbType) > 0 { + i -= len(m.DbType) + copy(dAtA[i:], m.DbType) + i = encodeVarint(dAtA, i, uint64(len(m.DbType))) + i-- + dAtA[i] = 0x1a + } + if len(m.CodeType) > 0 { + i -= len(m.CodeType) + copy(dAtA[i:], m.CodeType) + i = encodeVarint(dAtA, i, uint64(len(m.CodeType))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *VetQuery) MarshalVT() (dAtA []byte, err error) { +func (m *ParsedGoType) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *VetQuery) MarshalToVT(dAtA []byte) (int, error) { +func (m *ParsedGoType) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *VetQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ParsedGoType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4004,61 +3093,78 @@ func (m *VetQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Params) > 0 { - for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Params[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.StructTags) > 0 { + for k := range m.StructTags { + v := m.StructTags[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } } - if len(m.Cmd) > 0 { - i -= len(m.Cmd) - copy(dAtA[i:], m.Cmd) - i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) + if m.BasicType { + i-- + if m.BasicType { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.TypeName) > 0 { + i -= len(m.TypeName) + copy(dAtA[i:], m.TypeName) + i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) i-- dAtA[i] = 0x1a } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + if len(m.Package) > 0 { + i -= len(m.Package) + copy(dAtA[i:], m.Package) + i = encodeVarint(dAtA, i, uint64(len(m.Package))) i-- dAtA[i] = 0x12 } - if len(m.Sql) > 0 { - i -= len(m.Sql) - copy(dAtA[i:], m.Sql) - i = encodeVarint(dAtA, i, uint64(len(m.Sql))) + if len(m.ImportPath) > 0 { + i -= len(m.ImportPath) + copy(dAtA[i:], m.ImportPath) + i = encodeVarint(dAtA, i, uint64(len(m.ImportPath))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *PostgreSQL) MarshalVT() (dAtA []byte, err error) { +func (m *Settings) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *PostgreSQL) MarshalToVT(dAtA []byte) (int, error) { +func (m *Settings) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *PostgreSQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4070,38 +3176,121 @@ func (m *PostgreSQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Explain != nil { - size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if m.Codegen != nil { + size, err := m.Codegen.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if m.Json != nil { + size, err := m.Json.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + if m.Go != nil { + size, err := m.Go.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- + dAtA[i] = 0x52 + } + if len(m.Overrides) > 0 { + for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Overrides[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Rename) > 0 { + for k := range m.Rename { + v := m.Rename[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Queries) > 0 { + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Queries[iNdEx]) + copy(dAtA[i:], m.Queries[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Schema) > 0 { + for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Schema[iNdEx]) + copy(dAtA[i:], m.Schema[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Engine) > 0 { + i -= len(m.Engine) + copy(dAtA[i:], m.Engine) + i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *PostgreSQLExplain_Plan) MarshalVT() (dAtA []byte, err error) { +func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *PostgreSQLExplain_Plan) MarshalToVT(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4113,45 +3302,75 @@ func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVT(dAtA []byte) (int, error i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.IndexCond) > 0 { - i -= len(m.IndexCond) - copy(dAtA[i:], m.IndexCond) - i = encodeVarint(dAtA, i, uint64(len(m.IndexCond))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(m.ScanDirection) > 0 { - i -= len(m.ScanDirection) - copy(dAtA[i:], m.ScanDirection) - i = encodeVarint(dAtA, i, uint64(len(m.ScanDirection))) - i-- - dAtA[i] = 0x1 + if len(m.Options) > 0 { + i -= len(m.Options) + copy(dAtA[i:], m.Options) + i = encodeVarint(dAtA, i, uint64(len(m.Options))) i-- - dAtA[i] = 0xea + dAtA[i] = 0x1a } - if len(m.IndexName) > 0 { - i -= len(m.IndexName) - copy(dAtA[i:], m.IndexName) - i = encodeVarint(dAtA, i, uint64(len(m.IndexName))) - i-- - dAtA[i] = 0x1 + if len(m.Plugin) > 0 { + i -= len(m.Plugin) + copy(dAtA[i:], m.Plugin) + i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) i-- - dAtA[i] = 0xe2 + dAtA[i] = 0x12 } - if len(m.HashCond) > 0 { - i -= len(m.HashCond) - copy(dAtA[i:], m.HashCond) - i = encodeVarint(dAtA, i, uint64(len(m.HashCond))) - i-- - dAtA[i] = 0x1 + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) i-- - dAtA[i] = 0xda + dAtA[i] = 0xa } - if m.InnerUnique { - i-- - if m.InnerUnique { + return len(dAtA) - i, nil +} + +func (m *GoCode) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GoCode) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.OmitUnusedStructs { + i-- + if m.OmitUnusedStructs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 + } + if m.JsonTagsIdUppercase { + i-- + if m.JsonTagsIdUppercase { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -4161,138 +3380,173 @@ func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVT(dAtA []byte) (int, error i-- dAtA[i] = 0xd0 } - if len(m.JoinType) > 0 { - i -= len(m.JoinType) - copy(dAtA[i:], m.JoinType) - i = encodeVarint(dAtA, i, uint64(len(m.JoinType))) + if len(m.SqlDriver) > 0 { + i -= len(m.SqlDriver) + copy(dAtA[i:], m.SqlDriver) + i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } - if len(m.SortKey) > 0 { - for iNdEx := len(m.SortKey) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SortKey[iNdEx]) - copy(dAtA[i:], m.SortKey[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.SortKey[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - } - if m.TempWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) + if len(m.OutputBatchFileName) > 0 { + i -= len(m.OutputBatchFileName) + copy(dAtA[i:], m.OutputBatchFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xb8 + dAtA[i] = 0xc2 } - if m.TempReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) + if m.QueryParameterLimit != nil { + i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xb0 + dAtA[i] = 0xb8 } - if m.LocalWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) + if m.EmitPointersForNullTypes { + i-- + if m.EmitPointersForNullTypes { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xa8 + dAtA[i] = 0xb0 + } + if len(m.InflectionExcludeTableNames) > 0 { + for iNdEx := len(m.InflectionExcludeTableNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.InflectionExcludeTableNames[iNdEx]) + copy(dAtA[i:], m.InflectionExcludeTableNames[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.InflectionExcludeTableNames[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } } - if m.LocalDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) + if m.EmitAllEnumValues { + i-- + if m.EmitAllEnumValues { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa0 } - if m.LocalReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) + if m.EmitEnumValidMethod { + i-- + if m.EmitEnumValidMethod { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x98 } - if m.LocalHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) + if len(m.OutputFilesSuffix) > 0 { + i -= len(m.OutputFilesSuffix) + copy(dAtA[i:], m.OutputFilesSuffix) + i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x90 + dAtA[i] = 0x92 } - if m.SharedWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) + if len(m.OutputQuerierFileName) > 0 { + i -= len(m.OutputQuerierFileName) + copy(dAtA[i:], m.OutputQuerierFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x88 + dAtA[i] = 0x8a } - if m.SharedDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) + if len(m.OutputModelsFileName) > 0 { + i -= len(m.OutputModelsFileName) + copy(dAtA[i:], m.OutputModelsFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x80 + dAtA[i] = 0x82 } - if m.SharedReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) + if len(m.OutputDbFileName) > 0 { + i -= len(m.OutputDbFileName) + copy(dAtA[i:], m.OutputDbFileName) + i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) i-- - dAtA[i] = 0x78 + dAtA[i] = 0x7a } - if m.SharedHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) + if len(m.SqlPackage) > 0 { + i -= len(m.SqlPackage) + copy(dAtA[i:], m.SqlPackage) + i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) i-- - dAtA[i] = 0x70 + dAtA[i] = 0x72 } - if len(m.Plans) > 0 { - for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Plans[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x6a - } + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) + i-- + dAtA[i] = 0x6a } - if len(m.Output) > 0 { - for iNdEx := len(m.Output) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Output[iNdEx]) - copy(dAtA[i:], m.Output[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Output[iNdEx]))) - i-- - dAtA[i] = 0x62 - } + if len(m.Package) > 0 { + i -= len(m.Package) + copy(dAtA[i:], m.Package) + i = encodeVarint(dAtA, i, uint64(len(m.Package))) + i-- + dAtA[i] = 0x62 } - if m.PlanWidth != 0 { - i = encodeVarint(dAtA, i, uint64(m.PlanWidth)) + if len(m.JsonTagsCaseStyle) > 0 { + i -= len(m.JsonTagsCaseStyle) + copy(dAtA[i:], m.JsonTagsCaseStyle) + i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) i-- - dAtA[i] = 0x58 + dAtA[i] = 0x5a } - if m.PlanRows != 0 { - i = encodeVarint(dAtA, i, uint64(m.PlanRows)) + if m.EmitMethodsWithDbArgument { + i-- + if m.EmitMethodsWithDbArgument { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x50 } - if m.TotalCost != 0 { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) + if m.EmitParamsStructPointers { + i-- + if m.EmitParamsStructPointers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- - dAtA[i] = 0x4d + dAtA[i] = 0x48 } - if m.StartupCost != 0 { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) + if m.EmitResultStructPointers { + i-- + if m.EmitResultStructPointers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- - dAtA[i] = 0x45 + dAtA[i] = 0x40 } - if m.AsyncCapable { + if m.EmitExportedQueries { i-- - if m.AsyncCapable { + if m.EmitExportedQueries { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -4300,9 +3554,9 @@ func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVT(dAtA []byte) (int, error i-- dAtA[i] = 0x38 } - if m.ParallelAware { + if m.EmitEmptySlices { i-- - if m.ParallelAware { + if m.EmitEmptySlices { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -4310,63 +3564,78 @@ func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVT(dAtA []byte) (int, error i-- dAtA[i] = 0x30 } - if len(m.Alias) > 0 { - i -= len(m.Alias) - copy(dAtA[i:], m.Alias) - i = encodeVarint(dAtA, i, uint64(len(m.Alias))) + if m.EmitExactTableNames { i-- - dAtA[i] = 0x2a + if m.EmitExactTableNames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if len(m.Schema) > 0 { - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + if m.EmitPreparedQueries { i-- - dAtA[i] = 0x22 + if m.EmitPreparedQueries { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 } - if len(m.RelationName) > 0 { - i -= len(m.RelationName) - copy(dAtA[i:], m.RelationName) - i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) + if m.EmitDbTags { i-- - dAtA[i] = 0x1a + if m.EmitDbTags { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if len(m.ParentRelationship) > 0 { - i -= len(m.ParentRelationship) - copy(dAtA[i:], m.ParentRelationship) - i = encodeVarint(dAtA, i, uint64(len(m.ParentRelationship))) + if m.EmitJsonTags { i-- - dAtA[i] = 0x12 + if m.EmitJsonTags { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if len(m.NodeType) > 0 { - i -= len(m.NodeType) - copy(dAtA[i:], m.NodeType) - i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) + if m.EmitInterface { i-- - dAtA[i] = 0xa + if m.EmitInterface { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *PostgreSQLExplain_Planning) MarshalVT() (dAtA []byte, err error) { +func (m *JSONCode) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *PostgreSQLExplain_Planning) MarshalToVT(dAtA []byte) (int, error) { +func (m *JSONCode) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *PostgreSQLExplain_Planning) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *JSONCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4378,78 +3647,115 @@ func (m *PostgreSQLExplain_Planning) MarshalToSizedBufferVT(dAtA []byte) (int, e i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.TempWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) + if len(m.Filename) > 0 { + i -= len(m.Filename) + copy(dAtA[i:], m.Filename) + i = encodeVarint(dAtA, i, uint64(len(m.Filename))) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x1a } - if m.TempReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) + if len(m.Indent) > 0 { + i -= len(m.Indent) + copy(dAtA[i:], m.Indent) + i = encodeVarint(dAtA, i, uint64(len(m.Indent))) i-- - dAtA[i] = 0x48 + dAtA[i] = 0x12 } - if m.LocalWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) i-- - dAtA[i] = 0x40 + dAtA[i] = 0xa } - if m.LocalDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) - i-- - dAtA[i] = 0x38 + return len(dAtA) - i, nil +} + +func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.LocalReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) - i-- - dAtA[i] = 0x30 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.LocalHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) - i-- - dAtA[i] = 0x28 + return dAtA[:n], nil +} + +func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.SharedWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) - i-- - dAtA[i] = 0x20 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Schemas) > 0 { + for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Schemas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } } - if m.SharedDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if m.SharedReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) + if len(m.DefaultSchema) > 0 { + i -= len(m.DefaultSchema) + copy(dAtA[i:], m.DefaultSchema) + i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.SharedHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *PostgreSQLExplain) MarshalVT() (dAtA []byte, err error) { +func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *PostgreSQLExplain) MarshalToVT(dAtA []byte) (int, error) { +func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *PostgreSQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4461,67 +3767,78 @@ func (m *PostgreSQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Planning != nil { - size, err := m.Planning.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if len(m.CompositeTypes) > 0 { + for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a } - if len(m.Settings) > 0 { - for k := range m.Settings { - v := m.Settings[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + if len(m.Enums) > 0 { + for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Enums[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x22 } } - if m.Plan != nil { - size, err := m.Plan.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Tables) > 0 { + for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tables[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MySQL) MarshalVT() (dAtA []byte, err error) { +func (m *CompositeType) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *MySQL) MarshalToVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MySQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4533,38 +3850,42 @@ func (m *MySQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Explain != nil { - size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MySQLExplain_QueryBlock) MarshalVT() (dAtA []byte, err error) { +func (m *Enum) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *MySQLExplain_QueryBlock) MarshalToVT(dAtA []byte) (int, error) { +func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MySQLExplain_QueryBlock) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4576,91 +3897,51 @@ func (m *MySQLExplain_QueryBlock) MarshalToSizedBufferVT(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.NestedLoop) > 0 { - for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if m.OrderingOperation != nil { - size, err := m.OrderingOperation.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } - if len(m.CostInfo) > 0 { - for k := range m.CostInfo { - v := m.CostInfo[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) + if len(m.Vals) > 0 { + for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Vals[iNdEx]) + copy(dAtA[i:], m.Vals[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Vals[iNdEx]))) i-- dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a } } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.SelectId != 0 { - i = encodeVarint(dAtA, i, uint64(m.SelectId)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MySQLExplain_Table) MarshalVT() (dAtA []byte, err error) { +func (m *Table) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *MySQLExplain_Table) MarshalToVT(dAtA []byte) (int, error) { +func (m *Table) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MySQLExplain_Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Table) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4672,138 +3953,57 @@ func (m *MySQLExplain_Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Ref) > 0 { - for iNdEx := len(m.Ref) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ref[iNdEx]) - copy(dAtA[i:], m.Ref[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ref[iNdEx]))) - i-- - dAtA[i] = 0x6a - } - } - if len(m.KeyLength) > 0 { - i -= len(m.KeyLength) - copy(dAtA[i:], m.KeyLength) - i = encodeVarint(dAtA, i, uint64(len(m.KeyLength))) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x1a } - if len(m.UsedKeyParts) > 0 { - for iNdEx := len(m.UsedKeyParts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UsedKeyParts[iNdEx]) - copy(dAtA[i:], m.UsedKeyParts[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.UsedKeyParts[iNdEx]))) + if len(m.Columns) > 0 { + for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x12 } } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarint(dAtA, i, uint64(len(m.Key))) + if m.Rel != nil { + size, err := m.Rel.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x52 - } - if len(m.PossibleKeys) > 0 { - for iNdEx := len(m.PossibleKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PossibleKeys[iNdEx]) - copy(dAtA[i:], m.PossibleKeys[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.PossibleKeys[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if m.Insert { - i-- - if m.Insert { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.UsedColumns) > 0 { - for iNdEx := len(m.UsedColumns) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UsedColumns[iNdEx]) - copy(dAtA[i:], m.UsedColumns[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.UsedColumns[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.CostInfo) > 0 { - for k := range m.CostInfo { - v := m.CostInfo[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Filtered) > 0 { - i -= len(m.Filtered) - copy(dAtA[i:], m.Filtered) - i = encodeVarint(dAtA, i, uint64(len(m.Filtered))) - i-- - dAtA[i] = 0x2a - } - if m.RowsProducedPerJoin != 0 { - i = encodeVarint(dAtA, i, uint64(m.RowsProducedPerJoin)) - i-- - dAtA[i] = 0x20 - } - if m.RowsExaminedPerScan != 0 { - i = encodeVarint(dAtA, i, uint64(m.RowsExaminedPerScan)) - i-- - dAtA[i] = 0x18 - } - if len(m.AccessType) > 0 { - i -= len(m.AccessType) - copy(dAtA[i:], m.AccessType) - i = encodeVarint(dAtA, i, uint64(len(m.AccessType))) - i-- - dAtA[i] = 0x12 - } - if len(m.TableName) > 0 { - i -= len(m.TableName) - copy(dAtA[i:], m.TableName) - i = encodeVarint(dAtA, i, uint64(len(m.TableName))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MySQLExplain_NestedLoopObj) MarshalVT() (dAtA []byte, err error) { +func (m *Identifier) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *MySQLExplain_NestedLoopObj) MarshalToVT(dAtA []byte) (int, error) { +func (m *Identifier) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MySQLExplain_NestedLoopObj) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Identifier) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4815,38 +4015,49 @@ func (m *MySQLExplain_NestedLoopObj) MarshalToSizedBufferVT(dAtA []byte) (int, e i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.Schema) > 0 { + i -= len(m.Schema) + copy(dAtA[i:], m.Schema) + i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + i-- + dAtA[i] = 0x12 + } + if len(m.Catalog) > 0 { + i -= len(m.Catalog) + copy(dAtA[i:], m.Catalog) + i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MySQLExplain_OrderingOperation) MarshalVT() (dAtA []byte, err error) { +func (m *Column) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *MySQLExplain_OrderingOperation) MarshalToVT(dAtA []byte) (int, error) { +func (m *Column) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MySQLExplain_OrderingOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Column) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4858,79 +4069,160 @@ func (m *MySQLExplain_OrderingOperation) MarshalToSizedBufferVT(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.NestedLoop) > 0 { - for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 + if m.Unsigned { + i-- + if m.Unsigned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if len(m.OriginalName) > 0 { + i -= len(m.OriginalName) + copy(dAtA[i:], m.OriginalName) + i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) + i-- + dAtA[i] = 0x7a + } + if m.EmbedTable != nil { + size, err := m.EmbedTable.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 + } + if m.IsSqlcSlice { + i-- + if m.IsSqlcSlice { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if m.Type != nil { + size, err := m.Type.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if len(m.TableAlias) > 0 { + i -= len(m.TableAlias) + copy(dAtA[i:], m.TableAlias) + i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) + i-- + dAtA[i] = 0x5a } if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x52 } - if len(m.CostInfo) > 0 { - for k := range m.CostInfo { - v := m.CostInfo[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarint(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0x4a + } + if m.IsFuncCall { + i-- + if m.IsFuncCall { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x40 } - if m.UsingFilesort { + if m.IsNamedParam { i-- - if m.UsingFilesort { + if m.IsNamedParam { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x38 + } + if m.Length != 0 { + i = encodeVarint(dAtA, i, uint64(m.Length)) + i-- + dAtA[i] = 0x30 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x2a + } + if m.IsArray { + i-- + if m.IsArray { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.NotNull { + i-- + if m.NotNull { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MySQLExplain) MarshalVT() (dAtA []byte, err error) { +func (m *Query) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *MySQLExplain) MarshalToVT(dAtA []byte) (int, error) { +func (m *Query) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MySQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Query) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4942,78 +4234,81 @@ func (m *MySQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.QueryBlock != nil { - size, err := m.QueryBlock.MarshalToSizedBufferVT(dAtA[:i]) + if m.InsertIntoTable != nil { + size, err := m.InsertIntoTable.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ + dAtA[i] = 0x42 } - dAtA[offset] = uint8(v) - return base -} -func (m *File) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if len(m.Filename) > 0 { + i -= len(m.Filename) + copy(dAtA[i:], m.Filename) + i = encodeVarint(dAtA, i, uint64(len(m.Filename))) + i-- + dAtA[i] = 0x3a } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + if len(m.Comments) > 0 { + for iNdEx := len(m.Comments) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Comments[iNdEx]) + copy(dAtA[i:], m.Comments[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Comments[iNdEx]))) + i-- + dAtA[i] = 0x32 + } } - return dAtA[:n], nil -} - -func (m *File) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *File) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if len(m.Params) > 0 { + for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Params[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if len(m.Columns) > 0 { + for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } } - if len(m.Contents) > 0 { - i -= len(m.Contents) - copy(dAtA[i:], m.Contents) - i = encodeVarint(dAtA, i, uint64(len(m.Contents))) + if len(m.Cmd) > 0 { + i -= len(m.Cmd) + copy(dAtA[i:], m.Cmd) + i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- + dAtA[i] = 0x12 + } + if len(m.Text) > 0 { + i -= len(m.Text) + copy(dAtA[i:], m.Text) + i = encodeVarint(dAtA, i, uint64(len(m.Text))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Override) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Parameter) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5026,12 +4321,12 @@ func (m *Override) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Override) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Parameter) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Override) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5043,78 +4338,25 @@ func (m *Override) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.GoType != nil { - size, err := m.GoType.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if len(m.ColumnName) > 0 { - i -= len(m.ColumnName) - copy(dAtA[i:], m.ColumnName) - i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) - i-- - dAtA[i] = 0x42 - } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Column != nil { + size, err := m.Column.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x3a - } - if len(m.Column) > 0 { - i -= len(m.Column) - copy(dAtA[i:], m.Column) - i = encodeVarint(dAtA, i, uint64(len(m.Column))) - i-- - dAtA[i] = 0x32 - } - if m.Nullable { - i-- - if m.Nullable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.DbType) > 0 { - i -= len(m.DbType) - copy(dAtA[i:], m.DbType) - i = encodeVarint(dAtA, i, uint64(len(m.DbType))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if len(m.CodeType) > 0 { - i -= len(m.CodeType) - copy(dAtA[i:], m.CodeType) - i = encodeVarint(dAtA, i, uint64(len(m.CodeType))) + if m.Number != 0 { + i = encodeVarint(dAtA, i, uint64(m.Number)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *ParsedGoType) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CodeGenRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5127,12 +4369,12 @@ func (m *ParsedGoType) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ParsedGoType) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *ParsedGoType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5144,60 +4386,56 @@ func (m *ParsedGoType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.StructTags) > 0 { - for k := range m.StructTags { - v := m.StructTags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.BasicType { - i-- - if m.BasicType { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.PluginOptions) > 0 { + i -= len(m.PluginOptions) + copy(dAtA[i:], m.PluginOptions) + i = encodeVarint(dAtA, i, uint64(len(m.PluginOptions))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x2a } - if len(m.TypeName) > 0 { - i -= len(m.TypeName) - copy(dAtA[i:], m.TypeName) - i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) + if len(m.SqlcVersion) > 0 { + i -= len(m.SqlcVersion) + copy(dAtA[i:], m.SqlcVersion) + i = encodeVarint(dAtA, i, uint64(len(m.SqlcVersion))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = encodeVarint(dAtA, i, uint64(len(m.Package))) + if len(m.Queries) > 0 { + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Queries[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Catalog != nil { + size, err := m.Catalog.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } - if len(m.ImportPath) > 0 { - i -= len(m.ImportPath) - copy(dAtA[i:], m.ImportPath) - i = encodeVarint(dAtA, i, uint64(len(m.ImportPath))) + if m.Settings != nil { + size, err := m.Settings.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Settings) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CodeGenResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5210,12 +4448,12 @@ func (m *Settings) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Settings) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5227,6459 +4465,651 @@ func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Codegen != nil { - size, err := m.Codegen.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if m.Json != nil { - size, err := m.Json.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Files) > 0 { + for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Files[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - if m.Go != nil { - size, err := m.Go.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if len(m.Overrides) > 0 { - for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Overrides[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Rename) > 0 { - for k := range m.Rename { - v := m.Rename[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Queries[iNdEx]) - copy(dAtA[i:], m.Queries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Schema) > 0 { - for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Schema[iNdEx]) - copy(dAtA[i:], m.Schema[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) - i-- - dAtA[i] = 0x12 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { +func (m *File) SizeVT() (n int) { if m == nil { - return nil, nil + return 0 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return dAtA[:n], nil -} - -func (m *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + l = len(m.Contents) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n } -func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Override) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + l = len(m.CodeType) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Options) > 0 { - i -= len(m.Options) - copy(dAtA[i:], m.Options) - i = encodeVarint(dAtA, i, uint64(len(m.Options))) - i-- - dAtA[i] = 0x1a + l = len(m.DbType) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Plugin) > 0 { - i -= len(m.Plugin) - copy(dAtA[i:], m.Plugin) - i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) - i-- - dAtA[i] = 0x12 + if m.Nullable { + n += 2 } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0xa + l = len(m.Column) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return len(dAtA) - i, nil + if m.Table != nil { + l = m.Table.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.ColumnName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.GoType != nil { + l = m.GoType.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Unsigned { + n += 2 + } + n += len(m.unknownFields) + return n } -func (m *GoCode) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ParsedGoType) SizeVT() (n int) { if m == nil { - return nil, nil + return 0 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + var l int + _ = l + l = len(m.ImportPath) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return dAtA[:n], nil -} - -func (m *GoCode) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + l = len(m.Package) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.TypeName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.BasicType { + n += 2 + } + if len(m.StructTags) > 0 { + for k, v := range m.StructTags { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + n += len(m.unknownFields) + return n } -func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Settings) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + l = len(m.Version) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if m.OmitUnusedStructs { - i-- - if m.OmitUnusedStructs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + l = len(m.Engine) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Schema) > 0 { + for _, s := range m.Schema { + l = len(s) + n += 1 + l + sov(uint64(l)) } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 } - if m.JsonTagsIdUppercase { - i-- - if m.JsonTagsIdUppercase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Queries) > 0 { + for _, s := range m.Queries { + l = len(s) + n += 1 + l + sov(uint64(l)) } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 } - if len(m.SqlDriver) > 0 { - i -= len(m.SqlDriver) - copy(dAtA[i:], m.SqlDriver) - i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca + if len(m.Rename) > 0 { + for k, v := range m.Rename { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } } - if len(m.OutputBatchFileName) > 0 { - i -= len(m.OutputBatchFileName) - copy(dAtA[i:], m.OutputBatchFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if m.QueryParameterLimit != nil { - i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if m.EmitPointersForNullTypes { - i-- - if m.EmitPointersForNullTypes { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Overrides) > 0 { + for _, e := range m.Overrides { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 } - if len(m.InflectionExcludeTableNames) > 0 { - for iNdEx := len(m.InflectionExcludeTableNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.InflectionExcludeTableNames[iNdEx]) - copy(dAtA[i:], m.InflectionExcludeTableNames[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.InflectionExcludeTableNames[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } + if m.Go != nil { + l = m.Go.SizeVT() + n += 1 + l + sov(uint64(l)) } - if m.EmitAllEnumValues { - i-- - if m.EmitAllEnumValues { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 + if m.Json != nil { + l = m.Json.SizeVT() + n += 1 + l + sov(uint64(l)) } - if m.EmitEnumValidMethod { - i-- - if m.EmitEnumValidMethod { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 + if m.Codegen != nil { + l = m.Codegen.SizeVT() + n += 1 + l + sov(uint64(l)) } - if len(m.OutputFilesSuffix) > 0 { - i -= len(m.OutputFilesSuffix) - copy(dAtA[i:], m.OutputFilesSuffix) - i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 + n += len(m.unknownFields) + return n +} + +func (m *Codegen) SizeVT() (n int) { + if m == nil { + return 0 } - if len(m.OutputQuerierFileName) > 0 { - i -= len(m.OutputQuerierFileName) - copy(dAtA[i:], m.OutputQuerierFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a + var l int + _ = l + l = len(m.Out) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.OutputModelsFileName) > 0 { - i -= len(m.OutputModelsFileName) - copy(dAtA[i:], m.OutputModelsFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 + l = len(m.Plugin) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.OutputDbFileName) > 0 { - i -= len(m.OutputDbFileName) - copy(dAtA[i:], m.OutputDbFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) - i-- - dAtA[i] = 0x7a + l = len(m.Options) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.SqlPackage) > 0 { - i -= len(m.SqlPackage) - copy(dAtA[i:], m.SqlPackage) - i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) - i-- - dAtA[i] = 0x72 + n += len(m.unknownFields) + return n +} + +func (m *GoCode) SizeVT() (n int) { + if m == nil { + return 0 } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0x6a + var l int + _ = l + if m.EmitInterface { + n += 2 } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = encodeVarint(dAtA, i, uint64(len(m.Package))) - i-- - dAtA[i] = 0x62 + if m.EmitJsonTags { + n += 2 } - if len(m.JsonTagsCaseStyle) > 0 { - i -= len(m.JsonTagsCaseStyle) - copy(dAtA[i:], m.JsonTagsCaseStyle) - i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) - i-- - dAtA[i] = 0x5a + if m.EmitDbTags { + n += 2 } - if m.EmitMethodsWithDbArgument { - i-- - if m.EmitMethodsWithDbArgument { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 + if m.EmitPreparedQueries { + n += 2 } - if m.EmitParamsStructPointers { - i-- - if m.EmitParamsStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 + if m.EmitExactTableNames { + n += 2 } - if m.EmitResultStructPointers { - i-- - if m.EmitResultStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 + if m.EmitEmptySlices { + n += 2 } if m.EmitExportedQueries { - i-- - if m.EmitExportedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 + n += 2 } - if m.EmitEmptySlices { - i-- - if m.EmitEmptySlices { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 + if m.EmitResultStructPointers { + n += 2 } - if m.EmitExactTableNames { - i-- - if m.EmitExactTableNames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 + if m.EmitParamsStructPointers { + n += 2 } - if m.EmitPreparedQueries { - i-- - if m.EmitPreparedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 + if m.EmitMethodsWithDbArgument { + n += 2 } - if m.EmitDbTags { - i-- - if m.EmitDbTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 + l = len(m.JsonTagsCaseStyle) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if m.EmitJsonTags { - i-- - if m.EmitJsonTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 + l = len(m.Package) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if m.EmitInterface { - i-- - if m.EmitInterface { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + l = len(m.Out) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.SqlPackage) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.OutputDbFileName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.OutputModelsFileName) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + l = len(m.OutputQuerierFileName) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + l = len(m.OutputFilesSuffix) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + if m.EmitEnumValidMethod { + n += 3 + } + if m.EmitAllEnumValues { + n += 3 + } + if len(m.InflectionExcludeTableNames) > 0 { + for _, s := range m.InflectionExcludeTableNames { + l = len(s) + n += 2 + l + sov(uint64(l)) } - i-- - dAtA[i] = 0x8 } - return len(dAtA) - i, nil -} - -func (m *JSONCode) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.EmitPointersForNullTypes { + n += 3 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + if m.QueryParameterLimit != nil { + n += 2 + sov(uint64(*m.QueryParameterLimit)) } - return dAtA[:n], nil -} - -func (m *JSONCode) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + l = len(m.OutputBatchFileName) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + l = len(m.SqlDriver) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + if m.JsonTagsIdUppercase { + n += 3 + } + if m.OmitUnusedStructs { + n += 3 + } + n += len(m.unknownFields) + return n } -func (m *JSONCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *JSONCode) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x1a + l = len(m.Out) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Indent) > 0 { - i -= len(m.Indent) - copy(dAtA[i:], m.Indent) - i = encodeVarint(dAtA, i, uint64(len(m.Indent))) - i-- - dAtA[i] = 0x12 + l = len(m.Indent) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0xa + l = len(m.Filename) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return len(dAtA) - i, nil + n += len(m.unknownFields) + return n } -func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Catalog) SizeVT() (n int) { if m == nil { - return nil, nil + return 0 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + var l int + _ = l + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return dAtA[:n], nil -} - -func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + l = len(m.DefaultSchema) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Schemas) > 0 { + for _, e := range m.Schemas { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n } -func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Schema) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Schemas) > 0 { - for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Schemas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a + if len(m.Tables) > 0 { + for _, e := range m.Tables { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } } - if len(m.DefaultSchema) > 0 { - i -= len(m.DefaultSchema) - copy(dAtA[i:], m.DefaultSchema) - i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) - i-- - dAtA[i] = 0x12 + if len(m.Enums) > 0 { + for _, e := range m.Enums { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0xa + if len(m.CompositeTypes) > 0 { + for _, e := range m.CompositeTypes { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } } - return len(dAtA) - i, nil + n += len(m.unknownFields) + return n } -func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CompositeType) SizeVT() (n int) { if m == nil { - return nil, nil + return 0 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return dAtA[:n], nil -} - -func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n } -func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Enum) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.CompositeTypes) > 0 { - for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Enums) > 0 { - for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Enums[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Tables) > 0 { - for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Tables[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a + if len(m.Vals) > 0 { + for _, s := range m.Vals { + l = len(s) + n += 1 + l + sov(uint64(l)) } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CompositeType) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return dAtA[:n], nil -} - -func (m *CompositeType) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n += len(m.unknownFields) + return n } -func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Table) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.Rel != nil { + l = m.Rel.SizeVT() + n += 1 + l + sov(uint64(l)) } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x12 + if len(m.Columns) > 0 { + for _, e := range m.Columns { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return len(dAtA) - i, nil + n += len(m.unknownFields) + return n } -func (m *Enum) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Identifier) SizeVT() (n int) { if m == nil { - return nil, nil + return 0 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + var l int + _ = l + l = len(m.Catalog) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return dAtA[:n], nil -} - -func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + l = len(m.Schema) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n } -func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Column) SizeVT() (n int) { if m == nil { - return 0, nil + return 0 } - i := len(dAtA) - _ = i var l int _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x1a + if m.NotNull { + n += 2 } - if len(m.Vals) > 0 { - for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Vals[iNdEx]) - copy(dAtA[i:], m.Vals[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Vals[iNdEx]))) - i-- - dAtA[i] = 0x12 - } + if m.IsArray { + n += 2 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *Table) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.Length != 0 { + n += 1 + sov(uint64(m.Length)) } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + if m.IsNamedParam { + n += 2 } - return dAtA[:n], nil -} - -func (m *Table) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Table) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if m.IsFuncCall { + n += 2 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + l = len(m.Scope) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x1a + if m.Table != nil { + l = m.Table.SizeVT() + n += 1 + l + sov(uint64(l)) } - if len(m.Columns) > 0 { - for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } + l = len(m.TableAlias) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - if m.Rel != nil { - size, err := m.Rel.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Identifier) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Identifier) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Identifier) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.Schema) > 0 { - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarint(dAtA, i, uint64(len(m.Schema))) - i-- - dAtA[i] = 0x12 - } - if len(m.Catalog) > 0 { - i -= len(m.Catalog) - copy(dAtA[i:], m.Catalog) - i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Column) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Column) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Column) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if len(m.OriginalName) > 0 { - i -= len(m.OriginalName) - copy(dAtA[i:], m.OriginalName) - i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) - i-- - dAtA[i] = 0x7a - } - if m.EmbedTable != nil { - size, err := m.EmbedTable.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x72 + if m.Type != nil { + l = m.Type.SizeVT() + n += 1 + l + sov(uint64(l)) } if m.IsSqlcSlice { - i-- - if m.IsSqlcSlice { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if m.Type != nil { - size, err := m.Type.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if len(m.TableAlias) > 0 { - i -= len(m.TableAlias) - copy(dAtA[i:], m.TableAlias) - i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) - i-- - dAtA[i] = 0x5a - } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if len(m.Scope) > 0 { - i -= len(m.Scope) - copy(dAtA[i:], m.Scope) - i = encodeVarint(dAtA, i, uint64(len(m.Scope))) - i-- - dAtA[i] = 0x4a - } - if m.IsFuncCall { - i-- - if m.IsFuncCall { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.IsNamedParam { - i-- - if m.IsNamedParam { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.Length != 0 { - i = encodeVarint(dAtA, i, uint64(m.Length)) - i-- - dAtA[i] = 0x30 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x2a - } - if m.IsArray { - i-- - if m.IsArray { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.NotNull { - i-- - if m.NotNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 + n += 2 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if m.EmbedTable != nil { + l = m.EmbedTable.SizeVT() + n += 1 + l + sov(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *Query) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil + l = len(m.OriginalName) + if l > 0 { + n += 1 + l + sov(uint64(l)) } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + if m.Unsigned { + n += 3 } - return dAtA[:n], nil -} - -func (m *Query) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n += len(m.unknownFields) + return n } -func (m *Query) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Query) SizeVT() (n int) { if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.InsertIntoTable != nil { - size, err := m.InsertIntoTable.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x3a - } - if len(m.Comments) > 0 { - for iNdEx := len(m.Comments) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Comments[iNdEx]) - copy(dAtA[i:], m.Comments[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Comments[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Params) > 0 { - for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Params[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Columns) > 0 { - for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Cmd) > 0 { - i -= len(m.Cmd) - copy(dAtA[i:], m.Cmd) - i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarint(dAtA, i, uint64(len(m.Text))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Parameter) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Parameter) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Column != nil { - size, err := m.Column.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Number != 0 { - i = encodeVarint(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CodeGenRequest) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CodeGenRequest) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *CodeGenRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.PluginOptions) > 0 { - i -= len(m.PluginOptions) - copy(dAtA[i:], m.PluginOptions) - i = encodeVarint(dAtA, i, uint64(len(m.PluginOptions))) - i-- - dAtA[i] = 0x2a - } - if len(m.SqlcVersion) > 0 { - i -= len(m.SqlcVersion) - copy(dAtA[i:], m.SqlcVersion) - i = encodeVarint(dAtA, i, uint64(len(m.SqlcVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Queries[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Catalog != nil { - size, err := m.Catalog.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Settings != nil { - size, err := m.Settings.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CodeGenResponse) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CodeGenResponse) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *CodeGenResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Files) > 0 { - for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Files[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *VetParameter) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VetParameter) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *VetParameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Number != 0 { - i = encodeVarint(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *VetConfig) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VetConfig) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *VetConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Queries[iNdEx]) - copy(dAtA[i:], m.Queries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Schema) > 0 { - for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Schema[iNdEx]) - copy(dAtA[i:], m.Schema[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) - i-- - dAtA[i] = 0x12 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VetQuery) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VetQuery) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *VetQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Params) > 0 { - for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Params[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Cmd) > 0 { - i -= len(m.Cmd) - copy(dAtA[i:], m.Cmd) - i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sql) > 0 { - i -= len(m.Sql) - copy(dAtA[i:], m.Sql) - i = encodeVarint(dAtA, i, uint64(len(m.Sql))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PostgreSQL) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PostgreSQL) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *PostgreSQL) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Explain != nil { - size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PostgreSQLExplain_Plan) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PostgreSQLExplain_Plan) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.IndexCond) > 0 { - i -= len(m.IndexCond) - copy(dAtA[i:], m.IndexCond) - i = encodeVarint(dAtA, i, uint64(len(m.IndexCond))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(m.ScanDirection) > 0 { - i -= len(m.ScanDirection) - copy(dAtA[i:], m.ScanDirection) - i = encodeVarint(dAtA, i, uint64(len(m.ScanDirection))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - if len(m.IndexName) > 0 { - i -= len(m.IndexName) - copy(dAtA[i:], m.IndexName) - i = encodeVarint(dAtA, i, uint64(len(m.IndexName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if len(m.HashCond) > 0 { - i -= len(m.HashCond) - copy(dAtA[i:], m.HashCond) - i = encodeVarint(dAtA, i, uint64(len(m.HashCond))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda - } - if m.InnerUnique { - i-- - if m.InnerUnique { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 - } - if len(m.JoinType) > 0 { - i -= len(m.JoinType) - copy(dAtA[i:], m.JoinType) - i = encodeVarint(dAtA, i, uint64(len(m.JoinType))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - if len(m.SortKey) > 0 { - for iNdEx := len(m.SortKey) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SortKey[iNdEx]) - copy(dAtA[i:], m.SortKey[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.SortKey[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - } - if m.TempWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if m.TempReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 - } - if m.LocalWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if m.LocalDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.LocalReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.LocalHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.SharedWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.SharedDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.SharedReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) - i-- - dAtA[i] = 0x78 - } - if m.SharedHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) - i-- - dAtA[i] = 0x70 - } - if len(m.Plans) > 0 { - for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Plans[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x6a - } - } - if len(m.Output) > 0 { - for iNdEx := len(m.Output) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Output[iNdEx]) - copy(dAtA[i:], m.Output[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Output[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if m.PlanWidth != 0 { - i = encodeVarint(dAtA, i, uint64(m.PlanWidth)) - i-- - dAtA[i] = 0x58 - } - if m.PlanRows != 0 { - i = encodeVarint(dAtA, i, uint64(m.PlanRows)) - i-- - dAtA[i] = 0x50 - } - if m.TotalCost != 0 { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) - i-- - dAtA[i] = 0x4d - } - if m.StartupCost != 0 { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) - i-- - dAtA[i] = 0x45 - } - if m.AsyncCapable { - i-- - if m.AsyncCapable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.ParallelAware { - i-- - if m.ParallelAware { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.Alias) > 0 { - i -= len(m.Alias) - copy(dAtA[i:], m.Alias) - i = encodeVarint(dAtA, i, uint64(len(m.Alias))) - i-- - dAtA[i] = 0x2a - } - if len(m.Schema) > 0 { - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarint(dAtA, i, uint64(len(m.Schema))) - i-- - dAtA[i] = 0x22 - } - if len(m.RelationName) > 0 { - i -= len(m.RelationName) - copy(dAtA[i:], m.RelationName) - i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) - i-- - dAtA[i] = 0x1a - } - if len(m.ParentRelationship) > 0 { - i -= len(m.ParentRelationship) - copy(dAtA[i:], m.ParentRelationship) - i = encodeVarint(dAtA, i, uint64(len(m.ParentRelationship))) - i-- - dAtA[i] = 0x12 - } - if len(m.NodeType) > 0 { - i -= len(m.NodeType) - copy(dAtA[i:], m.NodeType) - i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PostgreSQLExplain_Planning) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PostgreSQLExplain_Planning) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *PostgreSQLExplain_Planning) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.TempWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) - i-- - dAtA[i] = 0x50 - } - if m.TempReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) - i-- - dAtA[i] = 0x48 - } - if m.LocalWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) - i-- - dAtA[i] = 0x40 - } - if m.LocalDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) - i-- - dAtA[i] = 0x38 - } - if m.LocalReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) - i-- - dAtA[i] = 0x30 - } - if m.LocalHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) - i-- - dAtA[i] = 0x28 - } - if m.SharedWrittenBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) - i-- - dAtA[i] = 0x20 - } - if m.SharedDirtiedBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) - i-- - dAtA[i] = 0x18 - } - if m.SharedReadBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) - i-- - dAtA[i] = 0x10 - } - if m.SharedHitBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *PostgreSQLExplain) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PostgreSQLExplain) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *PostgreSQLExplain) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Planning != nil { - size, err := m.Planning.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if len(m.Settings) > 0 { - for k := range m.Settings { - v := m.Settings[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if m.Plan != nil { - size, err := m.Plan.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MySQL) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MySQL) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MySQL) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Explain != nil { - size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MySQLExplain_QueryBlock) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MySQLExplain_QueryBlock) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MySQLExplain_QueryBlock) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.NestedLoop) > 0 { - for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if m.OrderingOperation != nil { - size, err := m.OrderingOperation.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if len(m.CostInfo) > 0 { - for k := range m.CostInfo { - v := m.CostInfo[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.SelectId != 0 { - i = encodeVarint(dAtA, i, uint64(m.SelectId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MySQLExplain_Table) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MySQLExplain_Table) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MySQLExplain_Table) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Ref) > 0 { - for iNdEx := len(m.Ref) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ref[iNdEx]) - copy(dAtA[i:], m.Ref[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ref[iNdEx]))) - i-- - dAtA[i] = 0x6a - } - } - if len(m.KeyLength) > 0 { - i -= len(m.KeyLength) - copy(dAtA[i:], m.KeyLength) - i = encodeVarint(dAtA, i, uint64(len(m.KeyLength))) - i-- - dAtA[i] = 0x62 - } - if len(m.UsedKeyParts) > 0 { - for iNdEx := len(m.UsedKeyParts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UsedKeyParts[iNdEx]) - copy(dAtA[i:], m.UsedKeyParts[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.UsedKeyParts[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarint(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x52 - } - if len(m.PossibleKeys) > 0 { - for iNdEx := len(m.PossibleKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PossibleKeys[iNdEx]) - copy(dAtA[i:], m.PossibleKeys[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.PossibleKeys[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if m.Insert { - i-- - if m.Insert { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.UsedColumns) > 0 { - for iNdEx := len(m.UsedColumns) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UsedColumns[iNdEx]) - copy(dAtA[i:], m.UsedColumns[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.UsedColumns[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.CostInfo) > 0 { - for k := range m.CostInfo { - v := m.CostInfo[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Filtered) > 0 { - i -= len(m.Filtered) - copy(dAtA[i:], m.Filtered) - i = encodeVarint(dAtA, i, uint64(len(m.Filtered))) - i-- - dAtA[i] = 0x2a - } - if m.RowsProducedPerJoin != 0 { - i = encodeVarint(dAtA, i, uint64(m.RowsProducedPerJoin)) - i-- - dAtA[i] = 0x20 - } - if m.RowsExaminedPerScan != 0 { - i = encodeVarint(dAtA, i, uint64(m.RowsExaminedPerScan)) - i-- - dAtA[i] = 0x18 - } - if len(m.AccessType) > 0 { - i -= len(m.AccessType) - copy(dAtA[i:], m.AccessType) - i = encodeVarint(dAtA, i, uint64(len(m.AccessType))) - i-- - dAtA[i] = 0x12 - } - if len(m.TableName) > 0 { - i -= len(m.TableName) - copy(dAtA[i:], m.TableName) - i = encodeVarint(dAtA, i, uint64(len(m.TableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MySQLExplain_NestedLoopObj) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MySQLExplain_NestedLoopObj) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MySQLExplain_NestedLoopObj) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MySQLExplain_OrderingOperation) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MySQLExplain_OrderingOperation) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MySQLExplain_OrderingOperation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.NestedLoop) > 0 { - for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if len(m.CostInfo) > 0 { - for k := range m.CostInfo { - v := m.CostInfo[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if m.UsingFilesort { - i-- - if m.UsingFilesort { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MySQLExplain) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MySQLExplain) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MySQLExplain) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.QueryBlock != nil { - size, err := m.QueryBlock.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *File) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Contents) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Override) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CodeType) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.DbType) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Nullable { - n += 2 - } - l = len(m.Column) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Table != nil { - l = m.Table.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.ColumnName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.GoType != nil { - l = m.GoType.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Unsigned { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *ParsedGoType) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ImportPath) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Package) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.TypeName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.BasicType { - n += 2 - } - if len(m.StructTags) > 0 { - for k, v := range m.StructTags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Settings) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Engine) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Schema) > 0 { - for _, s := range m.Schema { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Queries) > 0 { - for _, s := range m.Queries { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Rename) > 0 { - for k, v := range m.Rename { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.Overrides) > 0 { - for _, e := range m.Overrides { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if m.Go != nil { - l = m.Go.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Json != nil { - l = m.Json.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Codegen != nil { - l = m.Codegen.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Codegen) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Out) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Plugin) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Options) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *GoCode) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EmitInterface { - n += 2 - } - if m.EmitJsonTags { - n += 2 - } - if m.EmitDbTags { - n += 2 - } - if m.EmitPreparedQueries { - n += 2 - } - if m.EmitExactTableNames { - n += 2 - } - if m.EmitEmptySlices { - n += 2 - } - if m.EmitExportedQueries { - n += 2 - } - if m.EmitResultStructPointers { - n += 2 - } - if m.EmitParamsStructPointers { - n += 2 - } - if m.EmitMethodsWithDbArgument { - n += 2 - } - l = len(m.JsonTagsCaseStyle) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Package) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Out) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.SqlPackage) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.OutputDbFileName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.OutputModelsFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.OutputQuerierFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.OutputFilesSuffix) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - if m.EmitEnumValidMethod { - n += 3 - } - if m.EmitAllEnumValues { - n += 3 - } - if len(m.InflectionExcludeTableNames) > 0 { - for _, s := range m.InflectionExcludeTableNames { - l = len(s) - n += 2 + l + sov(uint64(l)) - } - } - if m.EmitPointersForNullTypes { - n += 3 - } - if m.QueryParameterLimit != nil { - n += 2 + sov(uint64(*m.QueryParameterLimit)) - } - l = len(m.OutputBatchFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.SqlDriver) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - if m.JsonTagsIdUppercase { - n += 3 - } - if m.OmitUnusedStructs { - n += 3 - } - n += len(m.unknownFields) - return n -} - -func (m *JSONCode) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Out) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Indent) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Filename) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Catalog) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.DefaultSchema) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Schemas) > 0 { - for _, e := range m.Schemas { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Schema) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Tables) > 0 { - for _, e := range m.Tables { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Enums) > 0 { - for _, e := range m.Enums { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if len(m.CompositeTypes) > 0 { - for _, e := range m.CompositeTypes { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *CompositeType) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Enum) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Vals) > 0 { - for _, s := range m.Vals { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Table) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Rel != nil { - l = m.Rel.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.Columns) > 0 { - for _, e := range m.Columns { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Identifier) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Catalog) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Schema) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Column) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.NotNull { - n += 2 - } - if m.IsArray { - n += 2 - } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Length != 0 { - n += 1 + sov(uint64(m.Length)) - } - if m.IsNamedParam { - n += 2 - } - if m.IsFuncCall { - n += 2 - } - l = len(m.Scope) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Table != nil { - l = m.Table.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.TableAlias) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Type != nil { - l = m.Type.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.IsSqlcSlice { - n += 2 - } - if m.EmbedTable != nil { - l = m.EmbedTable.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.OriginalName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Unsigned { - n += 3 - } - n += len(m.unknownFields) - return n -} - -func (m *Query) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Text) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Cmd) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Columns) > 0 { - for _, e := range m.Columns { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Params) > 0 { - for _, e := range m.Params { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Comments) > 0 { - for _, s := range m.Comments { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Filename) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.InsertIntoTable != nil { - l = m.InsertIntoTable.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Parameter) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Number != 0 { - n += 1 + sov(uint64(m.Number)) - } - if m.Column != nil { - l = m.Column.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *CodeGenRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Settings != nil { - l = m.Settings.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Catalog != nil { - l = m.Catalog.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.Queries) > 0 { - for _, e := range m.Queries { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.SqlcVersion) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.PluginOptions) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *CodeGenResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Files) > 0 { - for _, e := range m.Files { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *VetParameter) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Number != 0 { - n += 1 + sov(uint64(m.Number)) - } - n += len(m.unknownFields) - return n -} - -func (m *VetConfig) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Engine) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Schema) > 0 { - for _, s := range m.Schema { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Queries) > 0 { - for _, s := range m.Queries { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *VetQuery) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sql) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Cmd) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Params) > 0 { - for _, e := range m.Params { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *PostgreSQL) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Explain != nil { - l = m.Explain.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *PostgreSQLExplain_Plan) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodeType) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.ParentRelationship) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.RelationName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Schema) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Alias) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.ParallelAware { - n += 2 - } - if m.AsyncCapable { - n += 2 - } - if m.StartupCost != 0 { - n += 5 - } - if m.TotalCost != 0 { - n += 5 - } - if m.PlanRows != 0 { - n += 1 + sov(uint64(m.PlanRows)) - } - if m.PlanWidth != 0 { - n += 1 + sov(uint64(m.PlanWidth)) - } - if len(m.Output) > 0 { - for _, s := range m.Output { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Plans) > 0 { - for _, e := range m.Plans { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if m.SharedHitBlocks != 0 { - n += 1 + sov(uint64(m.SharedHitBlocks)) - } - if m.SharedReadBlocks != 0 { - n += 1 + sov(uint64(m.SharedReadBlocks)) - } - if m.SharedDirtiedBlocks != 0 { - n += 2 + sov(uint64(m.SharedDirtiedBlocks)) - } - if m.SharedWrittenBlocks != 0 { - n += 2 + sov(uint64(m.SharedWrittenBlocks)) - } - if m.LocalHitBlocks != 0 { - n += 2 + sov(uint64(m.LocalHitBlocks)) - } - if m.LocalReadBlocks != 0 { - n += 2 + sov(uint64(m.LocalReadBlocks)) - } - if m.LocalDirtiedBlocks != 0 { - n += 2 + sov(uint64(m.LocalDirtiedBlocks)) - } - if m.LocalWrittenBlocks != 0 { - n += 2 + sov(uint64(m.LocalWrittenBlocks)) - } - if m.TempReadBlocks != 0 { - n += 2 + sov(uint64(m.TempReadBlocks)) - } - if m.TempWrittenBlocks != 0 { - n += 2 + sov(uint64(m.TempWrittenBlocks)) - } - if len(m.SortKey) > 0 { - for _, s := range m.SortKey { - l = len(s) - n += 2 + l + sov(uint64(l)) - } - } - l = len(m.JoinType) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - if m.InnerUnique { - n += 3 - } - l = len(m.HashCond) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.IndexName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.ScanDirection) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.IndexCond) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *PostgreSQLExplain_Planning) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SharedHitBlocks != 0 { - n += 1 + sov(uint64(m.SharedHitBlocks)) - } - if m.SharedReadBlocks != 0 { - n += 1 + sov(uint64(m.SharedReadBlocks)) - } - if m.SharedDirtiedBlocks != 0 { - n += 1 + sov(uint64(m.SharedDirtiedBlocks)) - } - if m.SharedWrittenBlocks != 0 { - n += 1 + sov(uint64(m.SharedWrittenBlocks)) - } - if m.LocalHitBlocks != 0 { - n += 1 + sov(uint64(m.LocalHitBlocks)) - } - if m.LocalReadBlocks != 0 { - n += 1 + sov(uint64(m.LocalReadBlocks)) - } - if m.LocalDirtiedBlocks != 0 { - n += 1 + sov(uint64(m.LocalDirtiedBlocks)) - } - if m.LocalWrittenBlocks != 0 { - n += 1 + sov(uint64(m.LocalWrittenBlocks)) - } - if m.TempReadBlocks != 0 { - n += 1 + sov(uint64(m.TempReadBlocks)) - } - if m.TempWrittenBlocks != 0 { - n += 1 + sov(uint64(m.TempWrittenBlocks)) - } - n += len(m.unknownFields) - return n -} - -func (m *PostgreSQLExplain) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Plan != nil { - l = m.Plan.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.Settings) > 0 { - for k, v := range m.Settings { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if m.Planning != nil { - l = m.Planning.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *MySQL) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Explain != nil { - l = m.Explain.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *MySQLExplain_QueryBlock) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SelectId != 0 { - n += 1 + sov(uint64(m.SelectId)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.CostInfo) > 0 { - for k, v := range m.CostInfo { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if m.Table != nil { - l = m.Table.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.OrderingOperation != nil { - l = m.OrderingOperation.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.NestedLoop) > 0 { - for _, e := range m.NestedLoop { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *MySQLExplain_Table) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TableName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.AccessType) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.RowsExaminedPerScan != 0 { - n += 1 + sov(uint64(m.RowsExaminedPerScan)) - } - if m.RowsProducedPerJoin != 0 { - n += 1 + sov(uint64(m.RowsProducedPerJoin)) - } - l = len(m.Filtered) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.CostInfo) > 0 { - for k, v := range m.CostInfo { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.UsedColumns) > 0 { - for _, s := range m.UsedColumns { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if m.Insert { - n += 2 - } - if len(m.PossibleKeys) > 0 { - for _, s := range m.PossibleKeys { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.UsedKeyParts) > 0 { - for _, s := range m.UsedKeyParts { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.KeyLength) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Ref) > 0 { - for _, s := range m.Ref { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *MySQLExplain_NestedLoopObj) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Table != nil { - l = m.Table.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *MySQLExplain_OrderingOperation) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UsingFilesort { - n += 2 - } - if len(m.CostInfo) > 0 { - for k, v := range m.CostInfo { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if m.Table != nil { - l = m.Table.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.NestedLoop) > 0 { - for _, e := range m.NestedLoop { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *MySQLExplain) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryBlock != nil { - l = m.QueryBlock.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *File) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: File: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contents = append(m.Contents[:0], dAtA[iNdEx:postIndex]...) - if m.Contents == nil { - m.Contents = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Override) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Override: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Override: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DbType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DbType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Nullable = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Column = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Table == nil { - m.Table = &Identifier{} - } - if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ColumnName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ColumnName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GoType == nil { - m.GoType = &ParsedGoType{} - } - if err := m.GoType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Unsigned = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParsedGoType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParsedGoType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImportPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Package = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BasicType", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BasicType = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructTags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StructTags == nil { - m.StructTags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StructTags[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Settings) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Settings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Engine = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rename", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Rename == nil { - m.Rename = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Rename[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Overrides = append(m.Overrides, &Override{}) - if err := m.Overrides[len(m.Overrides)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Go", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Go == nil { - m.Go = &GoCode{} - } - if err := m.Go.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Json == nil { - m.Json = &JSONCode{} - } - if err := m.Json.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codegen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Codegen == nil { - m.Codegen = &Codegen{} - } - if err := m.Codegen.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Codegen) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Codegen: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Codegen: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Out = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Plugin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options[:0], dAtA[iNdEx:postIndex]...) - if m.Options == nil { - m.Options = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GoCode) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GoCode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GoCode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitInterface", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitInterface = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitJsonTags", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitJsonTags = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitDbTags", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitDbTags = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitPreparedQueries", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitPreparedQueries = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitExactTableNames", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitExactTableNames = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitEmptySlices", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitEmptySlices = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitExportedQueries", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitExportedQueries = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitResultStructPointers", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitResultStructPointers = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitParamsStructPointers", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitParamsStructPointers = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitMethodsWithDbArgument", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitMethodsWithDbArgument = bool(v != 0) - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsCaseStyle", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JsonTagsCaseStyle = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Package = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Out = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlPackage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SqlPackage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputDbFileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputDbFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputModelsFileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputModelsFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputQuerierFileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputQuerierFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputFilesSuffix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputFilesSuffix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitEnumValidMethod", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitEnumValidMethod = bool(v != 0) - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitAllEnumValues", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitAllEnumValues = bool(v != 0) - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InflectionExcludeTableNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InflectionExcludeTableNames = append(m.InflectionExcludeTableNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitPointersForNullTypes", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitPointersForNullTypes = bool(v != 0) - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryParameterLimit", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryParameterLimit = &v - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputBatchFileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputBatchFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlDriver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SqlDriver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsIdUppercase", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.JsonTagsIdUppercase = bool(v != 0) - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OmitUnusedStructs", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.OmitUnusedStructs = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONCode) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONCode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONCode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Out = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Indent", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Indent = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filename = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Catalog) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Catalog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Catalog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Comment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSchema", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultSchema = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schemas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schemas = append(m.Schemas, &Schema{}) - if err := m.Schemas[len(m.Schemas)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Schema) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Schema: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Schema: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Comment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tables", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tables = append(m.Tables, &Table{}) - if err := m.Tables[len(m.Tables)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enums", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Enums = append(m.Enums, &Enum{}) - if err := m.Enums[len(m.Enums)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompositeTypes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompositeTypes = append(m.CompositeTypes, &CompositeType{}) - if err := m.CompositeTypes[len(m.CompositeTypes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompositeType) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CompositeType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompositeType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Comment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Enum) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Enum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vals", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Vals = append(m.Vals, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Comment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Table) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Table: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Table: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Rel == nil { - m.Rel = &Identifier{} - } - if err := m.Rel.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Columns = append(m.Columns, &Column{}) - if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Comment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy + return 0 + } + var l int + _ = l + l = len(m.Text) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Cmd) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Columns) > 0 { + for _, e := range m.Columns { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Params) > 0 { + for _, e := range m.Params { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Comments) > 0 { + for _, s := range m.Comments { + l = len(s) + n += 1 + l + sov(uint64(l)) } } + l = len(m.Filename) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.InsertIntoTable != nil { + l = m.InsertIntoTable.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *Parameter) SizeVT() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + if m.Number != 0 { + n += 1 + sov(uint64(m.Number)) + } + if m.Column != nil { + l = m.Column.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n } -func (m *Identifier) UnmarshalVT(dAtA []byte) error { + +func (m *CodeGenRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Settings != nil { + l = m.Settings.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Catalog != nil { + l = m.Catalog.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.Queries) > 0 { + for _, e := range m.Queries { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + l = len(m.SqlcVersion) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.PluginOptions) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CodeGenResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Files) > 0 { + for _, e := range m.Files { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} +func soz(x uint64) (n int) { + return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *File) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11702,15 +5132,15 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Identifier: wiretype end group for non-group") + return fmt.Errorf("proto: File: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Identifier: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11738,13 +5168,13 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Catalog = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -11754,55 +5184,25 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Schema = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Contents = append(m.Contents[:0], dAtA[iNdEx:postIndex]...) + if m.Contents == nil { + m.Contents = []byte{} } - m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11826,7 +5226,7 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Column) UnmarshalVT(dAtA []byte) error { +func (m *Override) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11845,91 +5245,19 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Column: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Column: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotNull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NotNull = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsArray", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsArray = bool(v != 0) - case 5: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Override: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Override: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CodeType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11957,13 +5285,13 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Comment = string(dAtA[iNdEx:postIndex]) + m.CodeType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DbType", wireType) } - m.Length = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -11973,34 +5301,27 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Length |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNamedParam", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength } - m.IsNamedParam = bool(v != 0) - case 8: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DbType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsFuncCall", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -12017,10 +5338,10 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { break } } - m.IsFuncCall = bool(v != 0) - case 9: + m.Nullable = bool(v != 0) + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12048,9 +5369,9 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Scope = string(dAtA[iNdEx:postIndex]) + m.Column = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } @@ -12086,9 +5407,9 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex - case 11: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableAlias", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ColumnName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12116,11 +5437,11 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TableAlias = string(dAtA[iNdEx:postIndex]) + m.ColumnName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GoType", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12147,16 +5468,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Type == nil { - m.Type = &Identifier{} + if m.GoType == nil { + m.GoType = &ParsedGoType{} } - if err := m.Type.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.GoType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: + case 11: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSqlcSlice", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -12173,12 +5494,63 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { break } } - m.IsSqlcSlice = bool(v != 0) - case 14: + m.Unsigned = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedGoType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedGoType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EmbedTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ImportPath", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12188,31 +5560,59 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.EmbedTable == nil { - m.EmbedTable = &Identifier{} + m.ImportPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) } - if err := m.EmbedTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Package = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 15: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12240,11 +5640,11 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginalName = string(dAtA[iNdEx:postIndex]) + m.TypeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 16: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BasicType", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -12254,14 +5654,141 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if iNdEx >= l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BasicType = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StructTags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StructTags == nil { + m.StructTags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - m.Unsigned = bool(v != 0) + m.StructTags[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -12284,7 +5811,7 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Query) UnmarshalVT(dAtA []byte) error { +func (m *Settings) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12307,15 +5834,15 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Query: wiretype end group for non-group") + return fmt.Errorf("proto: Settings: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12343,11 +5870,11 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Text = string(dAtA[iNdEx:postIndex]) + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12375,11 +5902,43 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Engine = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12407,11 +5966,138 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Cmd = string(dAtA[iNdEx:postIndex]) + m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rename", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rename == nil { + m.Rename = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Rename[mapkey] = mapvalue iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12438,14 +6124,14 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Columns = append(m.Columns, &Column{}) - if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Overrides = append(m.Overrides, &Override{}) + if err := m.Overrides[len(m.Overrides)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Go", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12472,16 +6158,18 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Params = append(m.Params, &Parameter{}) - if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Go == nil { + m.Go = &GoCode{} + } + if err := m.Go.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comments", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12491,59 +6179,31 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Comments = append(m.Comments, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength + if m.Json == nil { + m.Json = &JSONCode{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Json.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Filename = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsertIntoTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Codegen", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12570,10 +6230,10 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.InsertIntoTable == nil { - m.InsertIntoTable = &Identifier{} + if m.Codegen == nil { + m.Codegen = &Codegen{} } - if err := m.InsertIntoTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Codegen.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12599,7 +6259,7 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Parameter) UnmarshalVT(dAtA []byte) error { +func (m *Codegen) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12622,17 +6282,17 @@ func (m *Parameter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Parameter: wiretype end group for non-group") + return fmt.Errorf("proto: Codegen: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Codegen: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) } - m.Number = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12642,16 +6302,29 @@ func (m *Parameter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Number |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Out = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12661,26 +6334,56 @@ func (m *Parameter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Column == nil { - m.Column = &Column{} + m.Plugin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } - if err := m.Column.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options[:0], dAtA[iNdEx:postIndex]...) + if m.Options == nil { + m.Options = []byte{} } iNdEx = postIndex default: @@ -12705,7 +6408,7 @@ func (m *Parameter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { +func (m *GoCode) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12728,17 +6431,117 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CodeGenRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GoCode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CodeGenRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GoCode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitInterface", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmitInterface = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitJsonTags", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmitJsonTags = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitDbTags", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmitDbTags = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitPreparedQueries", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmitPreparedQueries = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitExactTableNames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - var msglen int + m.EmitExactTableNames = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitEmptySlices", wireType) + } + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12748,33 +6551,17 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Settings == nil { - m.Settings = &Settings{} - } - if err := m.Settings.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) + m.EmitEmptySlices = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitExportedQueries", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12784,33 +6571,17 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Catalog == nil { - m.Catalog = &Catalog{} - } - if err := m.Catalog.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + m.EmitExportedQueries = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitResultStructPointers", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12820,31 +6591,17 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Queries = append(m.Queries, &Query{}) - if err := m.Queries[len(m.Queries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlcVersion", wireType) + m.EmitResultStructPointers = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitParamsStructPointers", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12854,29 +6611,17 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SqlcVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginOptions", wireType) + m.EmitParamsStructPointers = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitMethodsWithDbArgument", wireType) } - var byteLen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12886,82 +6631,17 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PluginOptions = append(m.PluginOptions[:0], dAtA[iNdEx:postIndex]...) - if m.PluginOptions == nil { - m.PluginOptions = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CodeGenResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CodeGenResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CodeGenResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.EmitMethodsWithDbArgument = bool(v != 0) + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsCaseStyle", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -12971,82 +6651,29 @@ func (m *CodeGenResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Files = append(m.Files, &File{}) - if err := m.Files[len(m.Files)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.JsonTagsCaseStyle = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VetParameter) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VetParameter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VetParameter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) } - m.Number = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -13056,65 +6683,59 @@ func (m *VetParameter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Number |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VetConfig) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + m.Package = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VetConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VetConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Out = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SqlPackage", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13142,11 +6763,11 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.SqlPackage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputDbFileName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13174,11 +6795,11 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Engine = string(dAtA[iNdEx:postIndex]) + m.OutputDbFileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 16: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputModelsFileName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13206,11 +6827,11 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) + m.OutputModelsFileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputQuerierFileName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13238,62 +6859,83 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) + m.OutputQuerierFileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutputFilesSuffix", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VetQuery) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + m.OutputFilesSuffix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitEnumValidMethod", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.EmitEnumValidMethod = bool(v != 0) + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitAllEnumValues", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VetQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VetQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmitAllEnumValues = bool(v != 0) + case 21: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sql", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InflectionExcludeTableNames", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13321,11 +6963,51 @@ func (m *VetQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sql = string(dAtA[iNdEx:postIndex]) + m.InflectionExcludeTableNames = append(m.InflectionExcludeTableNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitPointersForNullTypes", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmitPointersForNullTypes = bool(v != 0) + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryParameterLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.QueryParameterLimit = &v + case 24: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputBatchFileName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13353,11 +7035,11 @@ func (m *VetQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.OutputBatchFileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 25: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SqlDriver", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13385,13 +7067,13 @@ func (m *VetQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Cmd = string(dAtA[iNdEx:postIndex]) + m.SqlDriver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsIdUppercase", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -13401,82 +7083,17 @@ func (m *VetQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Params = append(m.Params, &VetParameter{}) - if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PostgreSQL) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PostgreSQL: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PostgreSQL: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + m.JsonTagsIdUppercase = bool(v != 0) + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitUnusedStructs", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -13486,28 +7103,12 @@ func (m *PostgreSQL) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explain == nil { - m.Explain = &PostgreSQLExplain{} - } - if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.OmitUnusedStructs = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -13530,7 +7131,7 @@ func (m *PostgreSQL) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { +func (m *JSONCode) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13553,15 +7154,15 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PostgreSQLExplain_Plan: wiretype end group for non-group") + return fmt.Errorf("proto: JSONCode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PostgreSQLExplain_Plan: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JSONCode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13589,11 +7190,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NodeType = string(dAtA[iNdEx:postIndex]) + m.Out = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentRelationship", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Indent", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13621,11 +7222,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ParentRelationship = string(dAtA[iNdEx:postIndex]) + m.Indent = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13653,11 +7254,62 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RelationName = string(dAtA[iNdEx:postIndex]) + m.Filename = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Catalog) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Catalog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Catalog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13685,11 +7337,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Schema = string(dAtA[iNdEx:postIndex]) + m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSchema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13717,111 +7369,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Alias = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ParallelAware", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ParallelAware = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsyncCapable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AsyncCapable = bool(v != 0) - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field StartupCost", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.StartupCost = float32(math.Float32frombits(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalCost", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.TotalCost = float32(math.Float32frombits(v)) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PlanRows", wireType) - } - m.PlanRows = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PlanRows |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PlanWidth", wireType) - } - m.PlanWidth = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PlanWidth |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: + m.DefaultSchema = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13849,11 +7401,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Output = append(m.Output, string(dAtA[iNdEx:postIndex])) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 13: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plans", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schemas", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13880,73 +7432,67 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Plans = append(m.Plans, &PostgreSQLExplain_Plan{}) - if err := m.Plans[len(m.Plans)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Schemas = append(m.Schemas, &Schema{}) + if err := m.Schemas[len(m.Schemas)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.SharedHitBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedHitBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength } - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.SharedReadBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedReadBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Schema) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.SharedDirtiedBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Schema: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Schema: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } - m.SharedWrittenBlocks = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -13956,35 +7502,29 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SharedWrittenBlocks |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - m.LocalHitBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocalHitBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.LocalReadBlocks = 0 + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -13994,35 +7534,29 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LocalReadBlocks |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - m.LocalDirtiedBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocalDirtiedBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength } - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.LocalWrittenBlocks = 0 + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tables", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14032,16 +7566,31 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LocalWrittenBlocks |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - m.TempReadBlocks = 0 + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tables = append(m.Tables, &Table{}) + if err := m.Tables[len(m.Tables)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Enums", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14051,16 +7600,31 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TempReadBlocks |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Enums = append(m.Enums, &Enum{}) + if err := m.Enums[len(m.Enums)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompositeTypes", wireType) } - m.TempWrittenBlocks = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14070,14 +7634,80 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TempWrittenBlocks |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 24: + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompositeTypes = append(m.CompositeTypes, &CompositeType{}) + if err := m.CompositeTypes[len(m.CompositeTypes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CompositeType) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CompositeType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CompositeType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SortKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14105,11 +7735,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SortKey = append(m.SortKey, string(dAtA[iNdEx:postIndex])) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 25: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JoinType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14137,63 +7767,62 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.JoinType = string(dAtA[iNdEx:postIndex]) + m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InnerUnique", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InnerUnique = bool(v != 0) - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HashCond", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Enum) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.HashCond = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 28: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Enum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14221,11 +7850,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IndexName = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 29: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScanDirection", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vals", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14253,11 +7882,11 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ScanDirection = string(dAtA[iNdEx:postIndex]) + m.Vals = append(m.Vals, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 30: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexCond", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14285,7 +7914,7 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IndexCond = string(dAtA[iNdEx:postIndex]) + m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -14309,7 +7938,7 @@ func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { +func (m *Table) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14332,93 +7961,17 @@ func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PostgreSQLExplain_Planning: wiretype end group for non-group") + return fmt.Errorf("proto: Table: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PostgreSQLExplain_Planning: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Table: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) - } - m.SharedHitBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedHitBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) - } - m.SharedReadBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedReadBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) - } - m.SharedDirtiedBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) - } - m.SharedWrittenBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedWrittenBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rel", wireType) } - m.LocalHitBlocks = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14428,73 +7981,33 @@ func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LocalHitBlocks |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) - } - m.LocalReadBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocalReadBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if msglen < 0 { + return ErrInvalidLength } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - m.LocalDirtiedBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocalDirtiedBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) + if m.Rel == nil { + m.Rel = &Identifier{} } - m.LocalWrittenBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocalWrittenBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Rel.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) } - m.TempReadBlocks = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14504,16 +8017,31 @@ func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TempReadBlocks |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Columns = append(m.Columns, &Column{}) + if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } - m.TempWrittenBlocks = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14523,11 +8051,24 @@ func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TempWrittenBlocks |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -14550,7 +8091,7 @@ func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { +func (m *Identifier) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14573,17 +8114,17 @@ func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PostgreSQLExplain: wiretype end group for non-group") + return fmt.Errorf("proto: Identifier: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PostgreSQLExplain: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Identifier: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14593,33 +8134,29 @@ func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Plan == nil { - m.Plan = &PostgreSQLExplain_Plan{} - } - if err := m.Plan.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Catalog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14629,124 +8166,29 @@ func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Settings == nil { - m.Settings = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Settings[mapkey] = mapvalue + m.Schema = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Planning", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14756,27 +8198,23 @@ func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Planning == nil { - m.Planning = &PostgreSQLExplain_Planning{} - } - if err := m.Planning.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -14800,7 +8238,7 @@ func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MySQL) UnmarshalVT(dAtA []byte) error { +func (m *Column) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14823,17 +8261,17 @@ func (m *MySQL) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MySQL: wiretype end group for non-group") + return fmt.Errorf("proto: Column: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MySQL: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Column: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14843,84 +8281,140 @@ func (m *MySQL) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotNull", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NotNull = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsArray", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsArray = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Explain == nil { - m.Explain = &MySQLExplain{} - } - if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + m.Length = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Length |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNamedParam", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MySQLExplain_QueryBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MySQLExplain_QueryBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.IsNamedParam = bool(v != 0) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsFuncCall", wireType) } - m.SelectId = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -14930,14 +8424,15 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SelectId |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + m.IsFuncCall = bool(v != 0) + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14965,11 +8460,11 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + m.Scope = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14996,107 +8491,48 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CostInfo == nil { - m.CostInfo = make(map[string]string) + if m.Table == nil { + m.Table = &Identifier{} } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableAlias", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF } - m.CostInfo[mapkey] = mapvalue + m.TableAlias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15123,16 +8559,36 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Table == nil { - m.Table = &MySQLExplain_Table{} + if m.Type == nil { + m.Type = &Identifier{} } - if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Type.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSqlcSlice", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSqlcSlice = bool(v != 0) + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrderingOperation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EmbedTable", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15159,18 +8615,18 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OrderingOperation == nil { - m.OrderingOperation = &MySQLExplain_OrderingOperation{} + if m.EmbedTable == nil { + m.EmbedTable = &Identifier{} } - if err := m.OrderingOperation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.EmbedTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -15180,26 +8636,44 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.NestedLoop = append(m.NestedLoop, &MySQLExplain_NestedLoopObj{}) - if err := m.NestedLoop[len(m.NestedLoop)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.OriginalName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Unsigned = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -15222,7 +8696,7 @@ func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { +func (m *Query) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15245,15 +8719,15 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MySQLExplain_Table: wiretype end group for non-group") + return fmt.Errorf("proto: Query: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MySQLExplain_Table: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15281,11 +8755,11 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TableName = string(dAtA[iNdEx:postIndex]) + m.Text = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15313,49 +8787,11 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AccessType = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RowsExaminedPerScan", wireType) - } - m.RowsExaminedPerScan = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RowsExaminedPerScan |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RowsProducedPerJoin", wireType) - } - m.RowsProducedPerJoin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RowsProducedPerJoin |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filtered", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15383,11 +8819,11 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Filtered = string(dAtA[iNdEx:postIndex]) + m.Cmd = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15414,193 +8850,16 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CostInfo == nil { - m.CostInfo = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.CostInfo[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsedColumns", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UsedColumns = append(m.UsedColumns, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Insert", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Insert = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PossibleKeys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Columns = append(m.Columns, &Column{}) + if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.PossibleKeys = append(m.PossibleKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 10: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -15610,27 +8869,29 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + m.Params = append(m.Params, &Parameter{}) + if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 11: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsedKeyParts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Comments", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15658,11 +8919,11 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UsedKeyParts = append(m.UsedKeyParts, string(dAtA[iNdEx:postIndex])) + m.Comments = append(m.Comments, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 12: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyLength", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15690,13 +8951,13 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.KeyLength = string(dAtA[iNdEx:postIndex]) + m.Filename = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 13: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InsertIntoTable", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -15706,23 +8967,27 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Ref = append(m.Ref, string(dAtA[iNdEx:postIndex])) + if m.InsertIntoTable == nil { + m.InsertIntoTable = &Identifier{} + } + if err := m.InsertIntoTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -15746,7 +9011,7 @@ func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MySQLExplain_NestedLoopObj) UnmarshalVT(dAtA []byte) error { +func (m *Parameter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15769,15 +9034,34 @@ func (m *MySQLExplain_NestedLoopObj) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MySQLExplain_NestedLoopObj: wiretype end group for non-group") + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MySQLExplain_NestedLoopObj: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15804,10 +9088,10 @@ func (m *MySQLExplain_NestedLoopObj) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Table == nil { - m.Table = &MySQLExplain_Table{} + if m.Column == nil { + m.Column = &Column{} } - if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Column.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -15833,7 +9117,7 @@ func (m *MySQLExplain_NestedLoopObj) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { +func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15856,17 +9140,17 @@ func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MySQLExplain_OrderingOperation: wiretype end group for non-group") + return fmt.Errorf("proto: CodeGenRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MySQLExplain_OrderingOperation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CodeGenRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UsingFilesort", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -15876,15 +9160,31 @@ func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.UsingFilesort = bool(v != 0) + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Settings == nil { + m.Settings = &Settings{} + } + if err := m.Settings.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15911,107 +9211,16 @@ func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CostInfo == nil { - m.CostInfo = make(map[string]string) + if m.Catalog == nil { + m.Catalog = &Catalog{} } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if err := m.Catalog.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.CostInfo[mapkey] = mapvalue iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16038,18 +9247,16 @@ func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Table == nil { - m.Table = &MySQLExplain_Table{} - } - if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Queries = append(m.Queries, &Query{}) + if err := m.Queries[len(m.Queries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SqlcVersion", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -16059,24 +9266,56 @@ func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.NestedLoop = append(m.NestedLoop, &MySQLExplain_NestedLoopObj{}) - if err := m.NestedLoop[len(m.NestedLoop)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.SqlcVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PluginOptions", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PluginOptions = append(m.PluginOptions[:0], dAtA[iNdEx:postIndex]...) + if m.PluginOptions == nil { + m.PluginOptions = []byte{} } iNdEx = postIndex default: @@ -16101,7 +9340,7 @@ func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MySQLExplain) UnmarshalVT(dAtA []byte) error { +func (m *CodeGenResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16124,15 +9363,15 @@ func (m *MySQLExplain) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MySQLExplain: wiretype end group for non-group") + return fmt.Errorf("proto: CodeGenResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MySQLExplain: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CodeGenResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16159,10 +9398,8 @@ func (m *MySQLExplain) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.QueryBlock == nil { - m.QueryBlock = &MySQLExplain_QueryBlock{} - } - if err := m.QueryBlock.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Files = append(m.Files, &File{}) + if err := m.Files[len(m.Files)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/internal/vet/vet.pb.go b/internal/vet/vet.pb.go new file mode 100644 index 0000000000..40a398326b --- /dev/null +++ b/internal/vet/vet.pb.go @@ -0,0 +1,1650 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: vet/vet.proto + +package vet + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *Parameter) Reset() { + *x = Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameter) ProtoMessage() {} + +func (x *Parameter) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Parameter.ProtoReflect.Descriptor instead. +func (*Parameter) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{0} +} + +func (x *Parameter) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Engine string `protobuf:"bytes,2,opt,name=engine,proto3" json:"engine,omitempty"` + Schema []string `protobuf:"bytes,3,rep,name=schema,proto3" json:"schema,omitempty"` + Queries []string `protobuf:"bytes,4,rep,name=queries,proto3" json:"queries,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{1} +} + +func (x *Config) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Config) GetEngine() string { + if x != nil { + return x.Engine + } + return "" +} + +func (x *Config) GetSchema() []string { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Config) GetQueries() []string { + if x != nil { + return x.Queries + } + return nil +} + +type Query struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` + Params []*Parameter `protobuf:"bytes,4,rep,name=params,json=parameters,proto3" json:"params,omitempty"` +} + +func (x *Query) Reset() { + *x = Query{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Query) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Query) ProtoMessage() {} + +func (x *Query) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Query.ProtoReflect.Descriptor instead. +func (*Query) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{2} +} + +func (x *Query) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +func (x *Query) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Query) GetCmd() string { + if x != nil { + return x.Cmd + } + return "" +} + +func (x *Query) GetParams() []*Parameter { + if x != nil { + return x.Params + } + return nil +} + +type PostgreSQL struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Explain *PostgreSQLExplain `protobuf:"bytes,1,opt,name=explain,proto3" json:"explain,omitempty"` +} + +func (x *PostgreSQL) Reset() { + *x = PostgreSQL{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgreSQL) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgreSQL) ProtoMessage() {} + +func (x *PostgreSQL) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostgreSQL.ProtoReflect.Descriptor instead. +func (*PostgreSQL) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{3} +} + +func (x *PostgreSQL) GetExplain() *PostgreSQLExplain { + if x != nil { + return x.Explain + } + return nil +} + +type PostgreSQLExplain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Plan *PostgreSQLExplain_Plan `protobuf:"bytes,1,opt,name=plan,json=Plan,proto3" json:"plan,omitempty"` + Settings map[string]string `protobuf:"bytes,2,rep,name=settings,json=Settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Planning *PostgreSQLExplain_Planning `protobuf:"bytes,3,opt,name=planning,json=Planning,proto3" json:"planning,omitempty"` +} + +func (x *PostgreSQLExplain) Reset() { + *x = PostgreSQLExplain{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgreSQLExplain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgreSQLExplain) ProtoMessage() {} + +func (x *PostgreSQLExplain) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostgreSQLExplain.ProtoReflect.Descriptor instead. +func (*PostgreSQLExplain) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{4} +} + +func (x *PostgreSQLExplain) GetPlan() *PostgreSQLExplain_Plan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *PostgreSQLExplain) GetSettings() map[string]string { + if x != nil { + return x.Settings + } + return nil +} + +func (x *PostgreSQLExplain) GetPlanning() *PostgreSQLExplain_Planning { + if x != nil { + return x.Planning + } + return nil +} + +type MySQL struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Explain *MySQLExplain `protobuf:"bytes,1,opt,name=explain,proto3" json:"explain,omitempty"` +} + +func (x *MySQL) Reset() { + *x = MySQL{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MySQL) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MySQL) ProtoMessage() {} + +func (x *MySQL) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MySQL.ProtoReflect.Descriptor instead. +func (*MySQL) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{5} +} + +func (x *MySQL) GetExplain() *MySQLExplain { + if x != nil { + return x.Explain + } + return nil +} + +type MySQLExplain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueryBlock *MySQLExplain_QueryBlock `protobuf:"bytes,1,opt,name=query_block,json=queryBlock,proto3" json:"query_block,omitempty"` +} + +func (x *MySQLExplain) Reset() { + *x = MySQLExplain{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MySQLExplain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MySQLExplain) ProtoMessage() {} + +func (x *MySQLExplain) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MySQLExplain.ProtoReflect.Descriptor instead. +func (*MySQLExplain) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{6} +} + +func (x *MySQLExplain) GetQueryBlock() *MySQLExplain_QueryBlock { + if x != nil { + return x.QueryBlock + } + return nil +} + +type PostgreSQLExplain_Plan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeType string `protobuf:"bytes,1,opt,name=node_type,json=Node Type,proto3" json:"node_type,omitempty"` + ParentRelationship string `protobuf:"bytes,2,opt,name=parent_relationship,json=Parent Relationship,proto3" json:"parent_relationship,omitempty"` + RelationName string `protobuf:"bytes,3,opt,name=relation_name,json=Relation Name,proto3" json:"relation_name,omitempty"` + Schema string `protobuf:"bytes,4,opt,name=schema,json=Schema,proto3" json:"schema,omitempty"` + Alias string `protobuf:"bytes,5,opt,name=alias,json=Alias,proto3" json:"alias,omitempty"` + ParallelAware bool `protobuf:"varint,6,opt,name=parallel_aware,json=Parallel Aware,proto3" json:"parallel_aware,omitempty"` + AsyncCapable bool `protobuf:"varint,7,opt,name=async_capable,json=Async Capable,proto3" json:"async_capable,omitempty"` + StartupCost float32 `protobuf:"fixed32,8,opt,name=startup_cost,json=Startup Cost,proto3" json:"startup_cost,omitempty"` + TotalCost float32 `protobuf:"fixed32,9,opt,name=total_cost,json=Total Cost,proto3" json:"total_cost,omitempty"` + PlanRows uint64 `protobuf:"varint,10,opt,name=plan_rows,json=Plan Rows,proto3" json:"plan_rows,omitempty"` + PlanWidth uint64 `protobuf:"varint,11,opt,name=plan_width,json=Plan Width,proto3" json:"plan_width,omitempty"` + Output []string `protobuf:"bytes,12,rep,name=output,json=Output,proto3" json:"output,omitempty"` + Plans []*PostgreSQLExplain_Plan `protobuf:"bytes,13,rep,name=plans,json=Plans,proto3" json:"plans,omitempty"` + // Embedded "Blocks" fields + SharedHitBlocks uint64 `protobuf:"varint,14,opt,name=shared_hit_blocks,json=Shared Hit Blocks,proto3" json:"shared_hit_blocks,omitempty"` + SharedReadBlocks uint64 `protobuf:"varint,15,opt,name=shared_read_blocks,json=Shared Read Blocks,proto3" json:"shared_read_blocks,omitempty"` + SharedDirtiedBlocks uint64 `protobuf:"varint,16,opt,name=shared_dirtied_blocks,json=Shared Dirtied Blocks,proto3" json:"shared_dirtied_blocks,omitempty"` + SharedWrittenBlocks uint64 `protobuf:"varint,17,opt,name=shared_written_blocks,json=Shared Written Blocks,proto3" json:"shared_written_blocks,omitempty"` + LocalHitBlocks uint64 `protobuf:"varint,18,opt,name=local_hit_blocks,json=Local Hit Blocks,proto3" json:"local_hit_blocks,omitempty"` + LocalReadBlocks uint64 `protobuf:"varint,19,opt,name=local_read_blocks,json=Local Read Blocks,proto3" json:"local_read_blocks,omitempty"` + LocalDirtiedBlocks uint64 `protobuf:"varint,20,opt,name=local_dirtied_blocks,json=Local Dirtied Blocks,proto3" json:"local_dirtied_blocks,omitempty"` + LocalWrittenBlocks uint64 `protobuf:"varint,21,opt,name=local_written_blocks,json=Local Written Blocks,proto3" json:"local_written_blocks,omitempty"` + TempReadBlocks uint64 `protobuf:"varint,22,opt,name=temp_read_blocks,json=Temp Read Blocks,proto3" json:"temp_read_blocks,omitempty"` + TempWrittenBlocks uint64 `protobuf:"varint,23,opt,name=temp_written_blocks,json=Temp Written Blocks,proto3" json:"temp_written_blocks,omitempty"` + // "Node Type": "Sort" fields + SortKey []string `protobuf:"bytes,24,rep,name=sort_key,json=Sort Key,proto3" json:"sort_key,omitempty"` + // "Node Type": "Hash Join" fields + JoinType string `protobuf:"bytes,25,opt,name=join_type,json=Join Type,proto3" json:"join_type,omitempty"` + InnerUnique bool `protobuf:"varint,26,opt,name=inner_unique,json=Inner Unique,proto3" json:"inner_unique,omitempty"` + HashCond string `protobuf:"bytes,27,opt,name=hash_cond,json=Hash Cond,proto3" json:"hash_cond,omitempty"` + // "Node Type": "Index Scan" fields + IndexName string `protobuf:"bytes,28,opt,name=index_name,json=Index Name,proto3" json:"index_name,omitempty"` + ScanDirection string `protobuf:"bytes,29,opt,name=scan_direction,json=Scan Direction,proto3" json:"scan_direction,omitempty"` + IndexCond string `protobuf:"bytes,30,opt,name=index_cond,json=Index Cond,proto3" json:"index_cond,omitempty"` +} + +func (x *PostgreSQLExplain_Plan) Reset() { + *x = PostgreSQLExplain_Plan{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgreSQLExplain_Plan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgreSQLExplain_Plan) ProtoMessage() {} + +func (x *PostgreSQLExplain_Plan) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostgreSQLExplain_Plan.ProtoReflect.Descriptor instead. +func (*PostgreSQLExplain_Plan) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *PostgreSQLExplain_Plan) GetNodeType() string { + if x != nil { + return x.NodeType + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetParentRelationship() string { + if x != nil { + return x.ParentRelationship + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetRelationName() string { + if x != nil { + return x.RelationName + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetSchema() string { + if x != nil { + return x.Schema + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetParallelAware() bool { + if x != nil { + return x.ParallelAware + } + return false +} + +func (x *PostgreSQLExplain_Plan) GetAsyncCapable() bool { + if x != nil { + return x.AsyncCapable + } + return false +} + +func (x *PostgreSQLExplain_Plan) GetStartupCost() float32 { + if x != nil { + return x.StartupCost + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetTotalCost() float32 { + if x != nil { + return x.TotalCost + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetPlanRows() uint64 { + if x != nil { + return x.PlanRows + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetPlanWidth() uint64 { + if x != nil { + return x.PlanWidth + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetOutput() []string { + if x != nil { + return x.Output + } + return nil +} + +func (x *PostgreSQLExplain_Plan) GetPlans() []*PostgreSQLExplain_Plan { + if x != nil { + return x.Plans + } + return nil +} + +func (x *PostgreSQLExplain_Plan) GetSharedHitBlocks() uint64 { + if x != nil { + return x.SharedHitBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetSharedReadBlocks() uint64 { + if x != nil { + return x.SharedReadBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetSharedDirtiedBlocks() uint64 { + if x != nil { + return x.SharedDirtiedBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetSharedWrittenBlocks() uint64 { + if x != nil { + return x.SharedWrittenBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetLocalHitBlocks() uint64 { + if x != nil { + return x.LocalHitBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetLocalReadBlocks() uint64 { + if x != nil { + return x.LocalReadBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetLocalDirtiedBlocks() uint64 { + if x != nil { + return x.LocalDirtiedBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetLocalWrittenBlocks() uint64 { + if x != nil { + return x.LocalWrittenBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetTempReadBlocks() uint64 { + if x != nil { + return x.TempReadBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetTempWrittenBlocks() uint64 { + if x != nil { + return x.TempWrittenBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Plan) GetSortKey() []string { + if x != nil { + return x.SortKey + } + return nil +} + +func (x *PostgreSQLExplain_Plan) GetJoinType() string { + if x != nil { + return x.JoinType + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetInnerUnique() bool { + if x != nil { + return x.InnerUnique + } + return false +} + +func (x *PostgreSQLExplain_Plan) GetHashCond() string { + if x != nil { + return x.HashCond + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetIndexName() string { + if x != nil { + return x.IndexName + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetScanDirection() string { + if x != nil { + return x.ScanDirection + } + return "" +} + +func (x *PostgreSQLExplain_Plan) GetIndexCond() string { + if x != nil { + return x.IndexCond + } + return "" +} + +type PostgreSQLExplain_Planning struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SharedHitBlocks uint64 `protobuf:"varint,1,opt,name=shared_hit_blocks,json=Shared Hit Blocks,proto3" json:"shared_hit_blocks,omitempty"` + SharedReadBlocks uint64 `protobuf:"varint,2,opt,name=shared_read_blocks,json=Shared Read Blocks,proto3" json:"shared_read_blocks,omitempty"` + SharedDirtiedBlocks uint64 `protobuf:"varint,3,opt,name=shared_dirtied_blocks,json=Shared Dirtied Blocks,proto3" json:"shared_dirtied_blocks,omitempty"` + SharedWrittenBlocks uint64 `protobuf:"varint,4,opt,name=shared_written_blocks,json=Shared Written Blocks,proto3" json:"shared_written_blocks,omitempty"` + LocalHitBlocks uint64 `protobuf:"varint,5,opt,name=local_hit_blocks,json=Local Hit Blocks,proto3" json:"local_hit_blocks,omitempty"` + LocalReadBlocks uint64 `protobuf:"varint,6,opt,name=local_read_blocks,json=Local Read Blocks,proto3" json:"local_read_blocks,omitempty"` + LocalDirtiedBlocks uint64 `protobuf:"varint,7,opt,name=local_dirtied_blocks,json=Local Dirtied Blocks,proto3" json:"local_dirtied_blocks,omitempty"` + LocalWrittenBlocks uint64 `protobuf:"varint,8,opt,name=local_written_blocks,json=Local Written Blocks,proto3" json:"local_written_blocks,omitempty"` + TempReadBlocks uint64 `protobuf:"varint,9,opt,name=temp_read_blocks,json=Temp Read Blocks,proto3" json:"temp_read_blocks,omitempty"` + TempWrittenBlocks uint64 `protobuf:"varint,10,opt,name=temp_written_blocks,json=Temp Written Blocks,proto3" json:"temp_written_blocks,omitempty"` +} + +func (x *PostgreSQLExplain_Planning) Reset() { + *x = PostgreSQLExplain_Planning{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgreSQLExplain_Planning) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgreSQLExplain_Planning) ProtoMessage() {} + +func (x *PostgreSQLExplain_Planning) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostgreSQLExplain_Planning.ProtoReflect.Descriptor instead. +func (*PostgreSQLExplain_Planning) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{4, 2} +} + +func (x *PostgreSQLExplain_Planning) GetSharedHitBlocks() uint64 { + if x != nil { + return x.SharedHitBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetSharedReadBlocks() uint64 { + if x != nil { + return x.SharedReadBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetSharedDirtiedBlocks() uint64 { + if x != nil { + return x.SharedDirtiedBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetSharedWrittenBlocks() uint64 { + if x != nil { + return x.SharedWrittenBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetLocalHitBlocks() uint64 { + if x != nil { + return x.LocalHitBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetLocalReadBlocks() uint64 { + if x != nil { + return x.LocalReadBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetLocalDirtiedBlocks() uint64 { + if x != nil { + return x.LocalDirtiedBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetLocalWrittenBlocks() uint64 { + if x != nil { + return x.LocalWrittenBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetTempReadBlocks() uint64 { + if x != nil { + return x.TempReadBlocks + } + return 0 +} + +func (x *PostgreSQLExplain_Planning) GetTempWrittenBlocks() uint64 { + if x != nil { + return x.TempWrittenBlocks + } + return 0 +} + +type MySQLExplain_QueryBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SelectId uint64 `protobuf:"varint,1,opt,name=select_id,json=selectId,proto3" json:"select_id,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + CostInfo map[string]string `protobuf:"bytes,3,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Table *MySQLExplain_Table `protobuf:"bytes,4,opt,name=table,proto3" json:"table,omitempty"` + OrderingOperation *MySQLExplain_OrderingOperation `protobuf:"bytes,5,opt,name=ordering_operation,json=orderingOperation,proto3" json:"ordering_operation,omitempty"` + NestedLoop []*MySQLExplain_NestedLoopObj `protobuf:"bytes,6,rep,name=nested_loop,json=nestedLoop,proto3" json:"nested_loop,omitempty"` +} + +func (x *MySQLExplain_QueryBlock) Reset() { + *x = MySQLExplain_QueryBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MySQLExplain_QueryBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MySQLExplain_QueryBlock) ProtoMessage() {} + +func (x *MySQLExplain_QueryBlock) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MySQLExplain_QueryBlock.ProtoReflect.Descriptor instead. +func (*MySQLExplain_QueryBlock) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *MySQLExplain_QueryBlock) GetSelectId() uint64 { + if x != nil { + return x.SelectId + } + return 0 +} + +func (x *MySQLExplain_QueryBlock) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MySQLExplain_QueryBlock) GetCostInfo() map[string]string { + if x != nil { + return x.CostInfo + } + return nil +} + +func (x *MySQLExplain_QueryBlock) GetTable() *MySQLExplain_Table { + if x != nil { + return x.Table + } + return nil +} + +func (x *MySQLExplain_QueryBlock) GetOrderingOperation() *MySQLExplain_OrderingOperation { + if x != nil { + return x.OrderingOperation + } + return nil +} + +func (x *MySQLExplain_QueryBlock) GetNestedLoop() []*MySQLExplain_NestedLoopObj { + if x != nil { + return x.NestedLoop + } + return nil +} + +type MySQLExplain_Table struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + AccessType string `protobuf:"bytes,2,opt,name=access_type,json=accessType,proto3" json:"access_type,omitempty"` + RowsExaminedPerScan uint64 `protobuf:"varint,3,opt,name=rows_examined_per_scan,json=rowsExaminedPerScan,proto3" json:"rows_examined_per_scan,omitempty"` + RowsProducedPerJoin uint64 `protobuf:"varint,4,opt,name=rows_produced_per_join,json=rowsProducedPerJoin,proto3" json:"rows_produced_per_join,omitempty"` + Filtered string `protobuf:"bytes,5,opt,name=filtered,proto3" json:"filtered,omitempty"` + CostInfo map[string]string `protobuf:"bytes,6,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + UsedColumns []string `protobuf:"bytes,7,rep,name=used_columns,json=usedColumns,proto3" json:"used_columns,omitempty"` + Insert bool `protobuf:"varint,8,opt,name=insert,proto3" json:"insert,omitempty"` + PossibleKeys []string `protobuf:"bytes,9,rep,name=possible_keys,json=possibleKeys,proto3" json:"possible_keys,omitempty"` + Key string `protobuf:"bytes,10,opt,name=key,proto3" json:"key,omitempty"` + UsedKeyParts []string `protobuf:"bytes,11,rep,name=used_key_parts,json=usedKeyParts,proto3" json:"used_key_parts,omitempty"` + KeyLength string `protobuf:"bytes,12,opt,name=key_length,json=keyLength,proto3" json:"key_length,omitempty"` + Ref []string `protobuf:"bytes,13,rep,name=ref,proto3" json:"ref,omitempty"` +} + +func (x *MySQLExplain_Table) Reset() { + *x = MySQLExplain_Table{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MySQLExplain_Table) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MySQLExplain_Table) ProtoMessage() {} + +func (x *MySQLExplain_Table) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MySQLExplain_Table.ProtoReflect.Descriptor instead. +func (*MySQLExplain_Table) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{6, 1} +} + +func (x *MySQLExplain_Table) GetTableName() string { + if x != nil { + return x.TableName + } + return "" +} + +func (x *MySQLExplain_Table) GetAccessType() string { + if x != nil { + return x.AccessType + } + return "" +} + +func (x *MySQLExplain_Table) GetRowsExaminedPerScan() uint64 { + if x != nil { + return x.RowsExaminedPerScan + } + return 0 +} + +func (x *MySQLExplain_Table) GetRowsProducedPerJoin() uint64 { + if x != nil { + return x.RowsProducedPerJoin + } + return 0 +} + +func (x *MySQLExplain_Table) GetFiltered() string { + if x != nil { + return x.Filtered + } + return "" +} + +func (x *MySQLExplain_Table) GetCostInfo() map[string]string { + if x != nil { + return x.CostInfo + } + return nil +} + +func (x *MySQLExplain_Table) GetUsedColumns() []string { + if x != nil { + return x.UsedColumns + } + return nil +} + +func (x *MySQLExplain_Table) GetInsert() bool { + if x != nil { + return x.Insert + } + return false +} + +func (x *MySQLExplain_Table) GetPossibleKeys() []string { + if x != nil { + return x.PossibleKeys + } + return nil +} + +func (x *MySQLExplain_Table) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *MySQLExplain_Table) GetUsedKeyParts() []string { + if x != nil { + return x.UsedKeyParts + } + return nil +} + +func (x *MySQLExplain_Table) GetKeyLength() string { + if x != nil { + return x.KeyLength + } + return "" +} + +func (x *MySQLExplain_Table) GetRef() []string { + if x != nil { + return x.Ref + } + return nil +} + +type MySQLExplain_NestedLoopObj struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Table *MySQLExplain_Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` +} + +func (x *MySQLExplain_NestedLoopObj) Reset() { + *x = MySQLExplain_NestedLoopObj{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MySQLExplain_NestedLoopObj) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MySQLExplain_NestedLoopObj) ProtoMessage() {} + +func (x *MySQLExplain_NestedLoopObj) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MySQLExplain_NestedLoopObj.ProtoReflect.Descriptor instead. +func (*MySQLExplain_NestedLoopObj) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{6, 2} +} + +func (x *MySQLExplain_NestedLoopObj) GetTable() *MySQLExplain_Table { + if x != nil { + return x.Table + } + return nil +} + +type MySQLExplain_OrderingOperation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UsingFilesort bool `protobuf:"varint,1,opt,name=using_filesort,json=usingFilesort,proto3" json:"using_filesort,omitempty"` + CostInfo map[string]string `protobuf:"bytes,2,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Table *MySQLExplain_Table `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` + NestedLoop []*MySQLExplain_NestedLoopObj `protobuf:"bytes,4,rep,name=nested_loop,json=nestedLoop,proto3" json:"nested_loop,omitempty"` +} + +func (x *MySQLExplain_OrderingOperation) Reset() { + *x = MySQLExplain_OrderingOperation{} + if protoimpl.UnsafeEnabled { + mi := &file_vet_vet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MySQLExplain_OrderingOperation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MySQLExplain_OrderingOperation) ProtoMessage() {} + +func (x *MySQLExplain_OrderingOperation) ProtoReflect() protoreflect.Message { + mi := &file_vet_vet_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MySQLExplain_OrderingOperation.ProtoReflect.Descriptor instead. +func (*MySQLExplain_OrderingOperation) Descriptor() ([]byte, []int) { + return file_vet_vet_proto_rawDescGZIP(), []int{6, 3} +} + +func (x *MySQLExplain_OrderingOperation) GetUsingFilesort() bool { + if x != nil { + return x.UsingFilesort + } + return false +} + +func (x *MySQLExplain_OrderingOperation) GetCostInfo() map[string]string { + if x != nil { + return x.CostInfo + } + return nil +} + +func (x *MySQLExplain_OrderingOperation) GetTable() *MySQLExplain_Table { + if x != nil { + return x.Table + } + return nil +} + +func (x *MySQLExplain_OrderingOperation) GetNestedLoop() []*MySQLExplain_NestedLoopObj { + if x != nil { + return x.NestedLoop + } + return nil +} + +var File_vet_vet_proto protoreflect.FileDescriptor + +var file_vet_vet_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x76, 0x65, 0x74, 0x2f, 0x76, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x03, 0x76, 0x65, 0x74, 0x22, 0x23, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x6c, 0x0a, 0x06, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x6b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x71, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x22, 0x3e, 0x0a, 0x0a, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, + 0x51, 0x4c, 0x12, 0x30, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x65, 0x78, 0x70, + 0x6c, 0x61, 0x69, 0x6e, 0x22, 0x8d, 0x0f, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x6c, + 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, + 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x40, 0x0a, 0x08, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, + 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3b, 0x0a, + 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, + 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x52, 0x08, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x93, 0x09, 0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, + 0x0a, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x50, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, + 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, + 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, + 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x50, 0x61, + 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x20, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0d, + 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x5f, 0x63, 0x6f, + 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x75, + 0x70, 0x20, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x20, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x72, + 0x6f, 0x77, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x50, 0x6c, 0x61, 0x6e, 0x20, + 0x52, 0x6f, 0x77, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x50, 0x6c, 0x61, 0x6e, 0x20, 0x57, + 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x05, + 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, + 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, + 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, + 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x53, 0x68, 0x61, 0x72, 0x65, + 0x64, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, + 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, + 0x61, 0x72, 0x65, 0x64, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x72, + 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, + 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x72, + 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, + 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x57, 0x72, 0x69, + 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, + 0x65, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x52, 0x65, 0x61, 0x64, + 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, + 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, + 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x72, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x53, 0x6f, 0x72, + 0x74, 0x20, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x20, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x49, 0x6e, 0x6e, 0x65, 0x72, + 0x20, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x68, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x48, 0x61, 0x73, 0x68, + 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x53, + 0x63, 0x61, 0x6e, 0x20, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x1a, 0xf4, 0x03, + 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x48, 0x69, + 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x52, 0x65, 0x61, + 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, + 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, + 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x69, + 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, + 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, 0x74, + 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, + 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x13, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x34, 0x0a, 0x05, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x2b, 0x0a, + 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, + 0x6e, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0xf3, 0x0a, 0x0a, 0x0c, 0x4d, + 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x0b, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0a, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x8e, 0x03, 0x0a, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x47, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, + 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, + 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, + 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, + 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, + 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, + 0x62, 0x6a, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x1a, 0x3b, + 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x97, 0x04, 0x0a, 0x05, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, + 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, + 0x6e, 0x65, 0x64, 0x50, 0x65, 0x72, 0x53, 0x63, 0x61, 0x6e, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, + 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x50, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x09, 0x63, + 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, + 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, + 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x4b, + 0x65, 0x79, 0x50, 0x61, 0x72, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, + 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, + 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0xb8, 0x02, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x75, + 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x6f, + 0x72, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, + 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, + 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, + 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, + 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, + 0x6f, 0x6f, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0x68, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x65, 0x74, 0x42, 0x08, 0x56, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x79, 0x6c, 0x65, 0x63, 0x6f, 0x6e, 0x72, 0x6f, 0x79, 0x2f, 0x73, + 0x71, 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x65, 0x74, + 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x03, 0x56, 0x65, 0x74, 0xca, 0x02, 0x03, 0x56, + 0x65, 0x74, 0xe2, 0x02, 0x0f, 0x56, 0x65, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x03, 0x56, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_vet_vet_proto_rawDescOnce sync.Once + file_vet_vet_proto_rawDescData = file_vet_vet_proto_rawDesc +) + +func file_vet_vet_proto_rawDescGZIP() []byte { + file_vet_vet_proto_rawDescOnce.Do(func() { + file_vet_vet_proto_rawDescData = protoimpl.X.CompressGZIP(file_vet_vet_proto_rawDescData) + }) + return file_vet_vet_proto_rawDescData +} + +var file_vet_vet_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_vet_vet_proto_goTypes = []interface{}{ + (*Parameter)(nil), // 0: vet.Parameter + (*Config)(nil), // 1: vet.Config + (*Query)(nil), // 2: vet.Query + (*PostgreSQL)(nil), // 3: vet.PostgreSQL + (*PostgreSQLExplain)(nil), // 4: vet.PostgreSQLExplain + (*MySQL)(nil), // 5: vet.MySQL + (*MySQLExplain)(nil), // 6: vet.MySQLExplain + nil, // 7: vet.PostgreSQLExplain.SettingsEntry + (*PostgreSQLExplain_Plan)(nil), // 8: vet.PostgreSQLExplain.Plan + (*PostgreSQLExplain_Planning)(nil), // 9: vet.PostgreSQLExplain.Planning + (*MySQLExplain_QueryBlock)(nil), // 10: vet.MySQLExplain.QueryBlock + (*MySQLExplain_Table)(nil), // 11: vet.MySQLExplain.Table + (*MySQLExplain_NestedLoopObj)(nil), // 12: vet.MySQLExplain.NestedLoopObj + (*MySQLExplain_OrderingOperation)(nil), // 13: vet.MySQLExplain.OrderingOperation + nil, // 14: vet.MySQLExplain.QueryBlock.CostInfoEntry + nil, // 15: vet.MySQLExplain.Table.CostInfoEntry + nil, // 16: vet.MySQLExplain.OrderingOperation.CostInfoEntry +} +var file_vet_vet_proto_depIdxs = []int32{ + 0, // 0: vet.Query.params:type_name -> vet.Parameter + 4, // 1: vet.PostgreSQL.explain:type_name -> vet.PostgreSQLExplain + 8, // 2: vet.PostgreSQLExplain.plan:type_name -> vet.PostgreSQLExplain.Plan + 7, // 3: vet.PostgreSQLExplain.settings:type_name -> vet.PostgreSQLExplain.SettingsEntry + 9, // 4: vet.PostgreSQLExplain.planning:type_name -> vet.PostgreSQLExplain.Planning + 6, // 5: vet.MySQL.explain:type_name -> vet.MySQLExplain + 10, // 6: vet.MySQLExplain.query_block:type_name -> vet.MySQLExplain.QueryBlock + 8, // 7: vet.PostgreSQLExplain.Plan.plans:type_name -> vet.PostgreSQLExplain.Plan + 14, // 8: vet.MySQLExplain.QueryBlock.cost_info:type_name -> vet.MySQLExplain.QueryBlock.CostInfoEntry + 11, // 9: vet.MySQLExplain.QueryBlock.table:type_name -> vet.MySQLExplain.Table + 13, // 10: vet.MySQLExplain.QueryBlock.ordering_operation:type_name -> vet.MySQLExplain.OrderingOperation + 12, // 11: vet.MySQLExplain.QueryBlock.nested_loop:type_name -> vet.MySQLExplain.NestedLoopObj + 15, // 12: vet.MySQLExplain.Table.cost_info:type_name -> vet.MySQLExplain.Table.CostInfoEntry + 11, // 13: vet.MySQLExplain.NestedLoopObj.table:type_name -> vet.MySQLExplain.Table + 16, // 14: vet.MySQLExplain.OrderingOperation.cost_info:type_name -> vet.MySQLExplain.OrderingOperation.CostInfoEntry + 11, // 15: vet.MySQLExplain.OrderingOperation.table:type_name -> vet.MySQLExplain.Table + 12, // 16: vet.MySQLExplain.OrderingOperation.nested_loop:type_name -> vet.MySQLExplain.NestedLoopObj + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_vet_vet_proto_init() } +func file_vet_vet_proto_init() { + if File_vet_vet_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_vet_vet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Query); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgreSQL); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgreSQLExplain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MySQL); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MySQLExplain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgreSQLExplain_Plan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgreSQLExplain_Planning); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MySQLExplain_QueryBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MySQLExplain_Table); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MySQLExplain_NestedLoopObj); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vet_vet_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MySQLExplain_OrderingOperation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_vet_vet_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_vet_vet_proto_goTypes, + DependencyIndexes: file_vet_vet_proto_depIdxs, + MessageInfos: file_vet_vet_proto_msgTypes, + }.Build() + File_vet_vet_proto = out.File + file_vet_vet_proto_rawDesc = nil + file_vet_vet_proto_goTypes = nil + file_vet_vet_proto_depIdxs = nil +} diff --git a/internal/vet/vet_vtproto.pb.go b/internal/vet/vet_vtproto.pb.go new file mode 100644 index 0000000000..88cf3d0302 --- /dev/null +++ b/internal/vet/vet_vtproto.pb.go @@ -0,0 +1,6886 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.4.0 +// source: vet/vet.proto + +package vet + +import ( + binary "encoding/binary" + fmt "fmt" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + math "math" + bits "math/bits" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Parameter) CloneVT() *Parameter { + if m == nil { + return (*Parameter)(nil) + } + r := &Parameter{ + Number: m.Number, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Parameter) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Config) CloneVT() *Config { + if m == nil { + return (*Config)(nil) + } + r := &Config{ + Version: m.Version, + Engine: m.Engine, + } + if rhs := m.Schema; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Schema = tmpContainer + } + if rhs := m.Queries; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Queries = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Config) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Query) CloneVT() *Query { + if m == nil { + return (*Query)(nil) + } + r := &Query{ + Sql: m.Sql, + Name: m.Name, + Cmd: m.Cmd, + } + if rhs := m.Params; rhs != nil { + tmpContainer := make([]*Parameter, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Params = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Query) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *PostgreSQL) CloneVT() *PostgreSQL { + if m == nil { + return (*PostgreSQL)(nil) + } + r := &PostgreSQL{ + Explain: m.Explain.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *PostgreSQL) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *PostgreSQLExplain_Plan) CloneVT() *PostgreSQLExplain_Plan { + if m == nil { + return (*PostgreSQLExplain_Plan)(nil) + } + r := &PostgreSQLExplain_Plan{ + NodeType: m.NodeType, + ParentRelationship: m.ParentRelationship, + RelationName: m.RelationName, + Schema: m.Schema, + Alias: m.Alias, + ParallelAware: m.ParallelAware, + AsyncCapable: m.AsyncCapable, + StartupCost: m.StartupCost, + TotalCost: m.TotalCost, + PlanRows: m.PlanRows, + PlanWidth: m.PlanWidth, + SharedHitBlocks: m.SharedHitBlocks, + SharedReadBlocks: m.SharedReadBlocks, + SharedDirtiedBlocks: m.SharedDirtiedBlocks, + SharedWrittenBlocks: m.SharedWrittenBlocks, + LocalHitBlocks: m.LocalHitBlocks, + LocalReadBlocks: m.LocalReadBlocks, + LocalDirtiedBlocks: m.LocalDirtiedBlocks, + LocalWrittenBlocks: m.LocalWrittenBlocks, + TempReadBlocks: m.TempReadBlocks, + TempWrittenBlocks: m.TempWrittenBlocks, + JoinType: m.JoinType, + InnerUnique: m.InnerUnique, + HashCond: m.HashCond, + IndexName: m.IndexName, + ScanDirection: m.ScanDirection, + IndexCond: m.IndexCond, + } + if rhs := m.Output; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Output = tmpContainer + } + if rhs := m.Plans; rhs != nil { + tmpContainer := make([]*PostgreSQLExplain_Plan, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Plans = tmpContainer + } + if rhs := m.SortKey; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.SortKey = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *PostgreSQLExplain_Plan) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *PostgreSQLExplain_Planning) CloneVT() *PostgreSQLExplain_Planning { + if m == nil { + return (*PostgreSQLExplain_Planning)(nil) + } + r := &PostgreSQLExplain_Planning{ + SharedHitBlocks: m.SharedHitBlocks, + SharedReadBlocks: m.SharedReadBlocks, + SharedDirtiedBlocks: m.SharedDirtiedBlocks, + SharedWrittenBlocks: m.SharedWrittenBlocks, + LocalHitBlocks: m.LocalHitBlocks, + LocalReadBlocks: m.LocalReadBlocks, + LocalDirtiedBlocks: m.LocalDirtiedBlocks, + LocalWrittenBlocks: m.LocalWrittenBlocks, + TempReadBlocks: m.TempReadBlocks, + TempWrittenBlocks: m.TempWrittenBlocks, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *PostgreSQLExplain_Planning) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *PostgreSQLExplain) CloneVT() *PostgreSQLExplain { + if m == nil { + return (*PostgreSQLExplain)(nil) + } + r := &PostgreSQLExplain{ + Plan: m.Plan.CloneVT(), + Planning: m.Planning.CloneVT(), + } + if rhs := m.Settings; rhs != nil { + tmpContainer := make(map[string]string, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v + } + r.Settings = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *PostgreSQLExplain) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MySQL) CloneVT() *MySQL { + if m == nil { + return (*MySQL)(nil) + } + r := &MySQL{ + Explain: m.Explain.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MySQL) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MySQLExplain_QueryBlock) CloneVT() *MySQLExplain_QueryBlock { + if m == nil { + return (*MySQLExplain_QueryBlock)(nil) + } + r := &MySQLExplain_QueryBlock{ + SelectId: m.SelectId, + Message: m.Message, + Table: m.Table.CloneVT(), + OrderingOperation: m.OrderingOperation.CloneVT(), + } + if rhs := m.CostInfo; rhs != nil { + tmpContainer := make(map[string]string, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v + } + r.CostInfo = tmpContainer + } + if rhs := m.NestedLoop; rhs != nil { + tmpContainer := make([]*MySQLExplain_NestedLoopObj, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.NestedLoop = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MySQLExplain_QueryBlock) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MySQLExplain_Table) CloneVT() *MySQLExplain_Table { + if m == nil { + return (*MySQLExplain_Table)(nil) + } + r := &MySQLExplain_Table{ + TableName: m.TableName, + AccessType: m.AccessType, + RowsExaminedPerScan: m.RowsExaminedPerScan, + RowsProducedPerJoin: m.RowsProducedPerJoin, + Filtered: m.Filtered, + Insert: m.Insert, + Key: m.Key, + KeyLength: m.KeyLength, + } + if rhs := m.CostInfo; rhs != nil { + tmpContainer := make(map[string]string, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v + } + r.CostInfo = tmpContainer + } + if rhs := m.UsedColumns; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.UsedColumns = tmpContainer + } + if rhs := m.PossibleKeys; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.PossibleKeys = tmpContainer + } + if rhs := m.UsedKeyParts; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.UsedKeyParts = tmpContainer + } + if rhs := m.Ref; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Ref = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MySQLExplain_Table) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MySQLExplain_NestedLoopObj) CloneVT() *MySQLExplain_NestedLoopObj { + if m == nil { + return (*MySQLExplain_NestedLoopObj)(nil) + } + r := &MySQLExplain_NestedLoopObj{ + Table: m.Table.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MySQLExplain_NestedLoopObj) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MySQLExplain_OrderingOperation) CloneVT() *MySQLExplain_OrderingOperation { + if m == nil { + return (*MySQLExplain_OrderingOperation)(nil) + } + r := &MySQLExplain_OrderingOperation{ + UsingFilesort: m.UsingFilesort, + Table: m.Table.CloneVT(), + } + if rhs := m.CostInfo; rhs != nil { + tmpContainer := make(map[string]string, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v + } + r.CostInfo = tmpContainer + } + if rhs := m.NestedLoop; rhs != nil { + tmpContainer := make([]*MySQLExplain_NestedLoopObj, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.NestedLoop = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MySQLExplain_OrderingOperation) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MySQLExplain) CloneVT() *MySQLExplain { + if m == nil { + return (*MySQLExplain)(nil) + } + r := &MySQLExplain{ + QueryBlock: m.QueryBlock.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MySQLExplain) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Parameter) EqualVT(that *Parameter) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Number != that.Number { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Parameter) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Parameter) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Config) EqualVT(that *Config) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Version != that.Version { + return false + } + if this.Engine != that.Engine { + return false + } + if len(this.Schema) != len(that.Schema) { + return false + } + for i, vx := range this.Schema { + vy := that.Schema[i] + if vx != vy { + return false + } + } + if len(this.Queries) != len(that.Queries) { + return false + } + for i, vx := range this.Queries { + vy := that.Queries[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Config) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Config) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Query) EqualVT(that *Query) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Sql != that.Sql { + return false + } + if this.Name != that.Name { + return false + } + if this.Cmd != that.Cmd { + return false + } + if len(this.Params) != len(that.Params) { + return false + } + for i, vx := range this.Params { + vy := that.Params[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Parameter{} + } + if q == nil { + q = &Parameter{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Query) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Query) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *PostgreSQL) EqualVT(that *PostgreSQL) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Explain.EqualVT(that.Explain) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PostgreSQL) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQL) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *PostgreSQLExplain_Plan) EqualVT(that *PostgreSQLExplain_Plan) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.NodeType != that.NodeType { + return false + } + if this.ParentRelationship != that.ParentRelationship { + return false + } + if this.RelationName != that.RelationName { + return false + } + if this.Schema != that.Schema { + return false + } + if this.Alias != that.Alias { + return false + } + if this.ParallelAware != that.ParallelAware { + return false + } + if this.AsyncCapable != that.AsyncCapable { + return false + } + if this.StartupCost != that.StartupCost { + return false + } + if this.TotalCost != that.TotalCost { + return false + } + if this.PlanRows != that.PlanRows { + return false + } + if this.PlanWidth != that.PlanWidth { + return false + } + if len(this.Output) != len(that.Output) { + return false + } + for i, vx := range this.Output { + vy := that.Output[i] + if vx != vy { + return false + } + } + if len(this.Plans) != len(that.Plans) { + return false + } + for i, vx := range this.Plans { + vy := that.Plans[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &PostgreSQLExplain_Plan{} + } + if q == nil { + q = &PostgreSQLExplain_Plan{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.SharedHitBlocks != that.SharedHitBlocks { + return false + } + if this.SharedReadBlocks != that.SharedReadBlocks { + return false + } + if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { + return false + } + if this.SharedWrittenBlocks != that.SharedWrittenBlocks { + return false + } + if this.LocalHitBlocks != that.LocalHitBlocks { + return false + } + if this.LocalReadBlocks != that.LocalReadBlocks { + return false + } + if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { + return false + } + if this.LocalWrittenBlocks != that.LocalWrittenBlocks { + return false + } + if this.TempReadBlocks != that.TempReadBlocks { + return false + } + if this.TempWrittenBlocks != that.TempWrittenBlocks { + return false + } + if len(this.SortKey) != len(that.SortKey) { + return false + } + for i, vx := range this.SortKey { + vy := that.SortKey[i] + if vx != vy { + return false + } + } + if this.JoinType != that.JoinType { + return false + } + if this.InnerUnique != that.InnerUnique { + return false + } + if this.HashCond != that.HashCond { + return false + } + if this.IndexName != that.IndexName { + return false + } + if this.ScanDirection != that.ScanDirection { + return false + } + if this.IndexCond != that.IndexCond { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PostgreSQLExplain_Plan) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQLExplain_Plan) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *PostgreSQLExplain_Planning) EqualVT(that *PostgreSQLExplain_Planning) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.SharedHitBlocks != that.SharedHitBlocks { + return false + } + if this.SharedReadBlocks != that.SharedReadBlocks { + return false + } + if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { + return false + } + if this.SharedWrittenBlocks != that.SharedWrittenBlocks { + return false + } + if this.LocalHitBlocks != that.LocalHitBlocks { + return false + } + if this.LocalReadBlocks != that.LocalReadBlocks { + return false + } + if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { + return false + } + if this.LocalWrittenBlocks != that.LocalWrittenBlocks { + return false + } + if this.TempReadBlocks != that.TempReadBlocks { + return false + } + if this.TempWrittenBlocks != that.TempWrittenBlocks { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PostgreSQLExplain_Planning) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQLExplain_Planning) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *PostgreSQLExplain) EqualVT(that *PostgreSQLExplain) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Plan.EqualVT(that.Plan) { + return false + } + if len(this.Settings) != len(that.Settings) { + return false + } + for i, vx := range this.Settings { + vy, ok := that.Settings[i] + if !ok { + return false + } + if vx != vy { + return false + } + } + if !this.Planning.EqualVT(that.Planning) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PostgreSQLExplain) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQLExplain) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MySQL) EqualVT(that *MySQL) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Explain.EqualVT(that.Explain) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQL) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQL) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MySQLExplain_QueryBlock) EqualVT(that *MySQLExplain_QueryBlock) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.SelectId != that.SelectId { + return false + } + if this.Message != that.Message { + return false + } + if len(this.CostInfo) != len(that.CostInfo) { + return false + } + for i, vx := range this.CostInfo { + vy, ok := that.CostInfo[i] + if !ok { + return false + } + if vx != vy { + return false + } + } + if !this.Table.EqualVT(that.Table) { + return false + } + if !this.OrderingOperation.EqualVT(that.OrderingOperation) { + return false + } + if len(this.NestedLoop) != len(that.NestedLoop) { + return false + } + for i, vx := range this.NestedLoop { + vy := that.NestedLoop[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &MySQLExplain_NestedLoopObj{} + } + if q == nil { + q = &MySQLExplain_NestedLoopObj{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQLExplain_QueryBlock) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQLExplain_QueryBlock) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MySQLExplain_Table) EqualVT(that *MySQLExplain_Table) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.TableName != that.TableName { + return false + } + if this.AccessType != that.AccessType { + return false + } + if this.RowsExaminedPerScan != that.RowsExaminedPerScan { + return false + } + if this.RowsProducedPerJoin != that.RowsProducedPerJoin { + return false + } + if this.Filtered != that.Filtered { + return false + } + if len(this.CostInfo) != len(that.CostInfo) { + return false + } + for i, vx := range this.CostInfo { + vy, ok := that.CostInfo[i] + if !ok { + return false + } + if vx != vy { + return false + } + } + if len(this.UsedColumns) != len(that.UsedColumns) { + return false + } + for i, vx := range this.UsedColumns { + vy := that.UsedColumns[i] + if vx != vy { + return false + } + } + if this.Insert != that.Insert { + return false + } + if len(this.PossibleKeys) != len(that.PossibleKeys) { + return false + } + for i, vx := range this.PossibleKeys { + vy := that.PossibleKeys[i] + if vx != vy { + return false + } + } + if this.Key != that.Key { + return false + } + if len(this.UsedKeyParts) != len(that.UsedKeyParts) { + return false + } + for i, vx := range this.UsedKeyParts { + vy := that.UsedKeyParts[i] + if vx != vy { + return false + } + } + if this.KeyLength != that.KeyLength { + return false + } + if len(this.Ref) != len(that.Ref) { + return false + } + for i, vx := range this.Ref { + vy := that.Ref[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQLExplain_Table) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQLExplain_Table) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MySQLExplain_NestedLoopObj) EqualVT(that *MySQLExplain_NestedLoopObj) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Table.EqualVT(that.Table) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQLExplain_NestedLoopObj) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQLExplain_NestedLoopObj) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MySQLExplain_OrderingOperation) EqualVT(that *MySQLExplain_OrderingOperation) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.UsingFilesort != that.UsingFilesort { + return false + } + if len(this.CostInfo) != len(that.CostInfo) { + return false + } + for i, vx := range this.CostInfo { + vy, ok := that.CostInfo[i] + if !ok { + return false + } + if vx != vy { + return false + } + } + if !this.Table.EqualVT(that.Table) { + return false + } + if len(this.NestedLoop) != len(that.NestedLoop) { + return false + } + for i, vx := range this.NestedLoop { + vy := that.NestedLoop[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &MySQLExplain_NestedLoopObj{} + } + if q == nil { + q = &MySQLExplain_NestedLoopObj{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQLExplain_OrderingOperation) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQLExplain_OrderingOperation) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MySQLExplain) EqualVT(that *MySQLExplain) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.QueryBlock.EqualVT(that.QueryBlock) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQLExplain) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQLExplain) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Parameter) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Parameter) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Parameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Number != 0 { + i = encodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Config) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Config) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Queries) > 0 { + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Queries[iNdEx]) + copy(dAtA[i:], m.Queries[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Schema) > 0 { + for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Schema[iNdEx]) + copy(dAtA[i:], m.Schema[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Engine) > 0 { + i -= len(m.Engine) + copy(dAtA[i:], m.Engine) + i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Query) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Query) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Params) > 0 { + for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Params[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Cmd) > 0 { + i -= len(m.Cmd) + copy(dAtA[i:], m.Cmd) + i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sql) > 0 { + i -= len(m.Sql) + copy(dAtA[i:], m.Sql) + i = encodeVarint(dAtA, i, uint64(len(m.Sql))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQL) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQL) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PostgreSQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQLExplain_Plan) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQLExplain_Plan) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.IndexCond) > 0 { + i -= len(m.IndexCond) + copy(dAtA[i:], m.IndexCond) + i = encodeVarint(dAtA, i, uint64(len(m.IndexCond))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf2 + } + if len(m.ScanDirection) > 0 { + i -= len(m.ScanDirection) + copy(dAtA[i:], m.ScanDirection) + i = encodeVarint(dAtA, i, uint64(len(m.ScanDirection))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } + if len(m.IndexName) > 0 { + i -= len(m.IndexName) + copy(dAtA[i:], m.IndexName) + i = encodeVarint(dAtA, i, uint64(len(m.IndexName))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + } + if len(m.HashCond) > 0 { + i -= len(m.HashCond) + copy(dAtA[i:], m.HashCond) + i = encodeVarint(dAtA, i, uint64(len(m.HashCond))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + } + if m.InnerUnique { + i-- + if m.InnerUnique { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 + } + if len(m.JoinType) > 0 { + i -= len(m.JoinType) + copy(dAtA[i:], m.JoinType) + i = encodeVarint(dAtA, i, uint64(len(m.JoinType))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + if len(m.SortKey) > 0 { + for iNdEx := len(m.SortKey) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SortKey[iNdEx]) + copy(dAtA[i:], m.SortKey[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.SortKey[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + } + if m.TempWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 + } + if m.TempReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } + if m.LocalWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if m.LocalDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } + if m.LocalReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + if m.LocalHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.SharedWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.SharedDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if m.SharedReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) + i-- + dAtA[i] = 0x78 + } + if m.SharedHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) + i-- + dAtA[i] = 0x70 + } + if len(m.Plans) > 0 { + for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Plans[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x6a + } + } + if len(m.Output) > 0 { + for iNdEx := len(m.Output) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Output[iNdEx]) + copy(dAtA[i:], m.Output[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Output[iNdEx]))) + i-- + dAtA[i] = 0x62 + } + } + if m.PlanWidth != 0 { + i = encodeVarint(dAtA, i, uint64(m.PlanWidth)) + i-- + dAtA[i] = 0x58 + } + if m.PlanRows != 0 { + i = encodeVarint(dAtA, i, uint64(m.PlanRows)) + i-- + dAtA[i] = 0x50 + } + if m.TotalCost != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) + i-- + dAtA[i] = 0x4d + } + if m.StartupCost != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) + i-- + dAtA[i] = 0x45 + } + if m.AsyncCapable { + i-- + if m.AsyncCapable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.ParallelAware { + i-- + if m.ParallelAware { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.Alias) > 0 { + i -= len(m.Alias) + copy(dAtA[i:], m.Alias) + i = encodeVarint(dAtA, i, uint64(len(m.Alias))) + i-- + dAtA[i] = 0x2a + } + if len(m.Schema) > 0 { + i -= len(m.Schema) + copy(dAtA[i:], m.Schema) + i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + i-- + dAtA[i] = 0x22 + } + if len(m.RelationName) > 0 { + i -= len(m.RelationName) + copy(dAtA[i:], m.RelationName) + i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) + i-- + dAtA[i] = 0x1a + } + if len(m.ParentRelationship) > 0 { + i -= len(m.ParentRelationship) + copy(dAtA[i:], m.ParentRelationship) + i = encodeVarint(dAtA, i, uint64(len(m.ParentRelationship))) + i-- + dAtA[i] = 0x12 + } + if len(m.NodeType) > 0 { + i -= len(m.NodeType) + copy(dAtA[i:], m.NodeType) + i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQLExplain_Planning) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQLExplain_Planning) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PostgreSQLExplain_Planning) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.TempWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) + i-- + dAtA[i] = 0x50 + } + if m.TempReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) + i-- + dAtA[i] = 0x48 + } + if m.LocalWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) + i-- + dAtA[i] = 0x40 + } + if m.LocalDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) + i-- + dAtA[i] = 0x38 + } + if m.LocalReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) + i-- + dAtA[i] = 0x30 + } + if m.LocalHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) + i-- + dAtA[i] = 0x28 + } + if m.SharedWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) + i-- + dAtA[i] = 0x20 + } + if m.SharedDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) + i-- + dAtA[i] = 0x18 + } + if m.SharedReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) + i-- + dAtA[i] = 0x10 + } + if m.SharedHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQLExplain) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQLExplain) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PostgreSQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Planning != nil { + size, err := m.Planning.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Settings) > 0 { + for k := range m.Settings { + v := m.Settings[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if m.Plan != nil { + size, err := m.Plan.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQL) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQL) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MySQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_QueryBlock) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_QueryBlock) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MySQLExplain_QueryBlock) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.NestedLoop) > 0 { + for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if m.OrderingOperation != nil { + size, err := m.OrderingOperation.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.CostInfo) > 0 { + for k := range m.CostInfo { + v := m.CostInfo[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.SelectId != 0 { + i = encodeVarint(dAtA, i, uint64(m.SelectId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_Table) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_Table) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MySQLExplain_Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Ref) > 0 { + for iNdEx := len(m.Ref) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ref[iNdEx]) + copy(dAtA[i:], m.Ref[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Ref[iNdEx]))) + i-- + dAtA[i] = 0x6a + } + } + if len(m.KeyLength) > 0 { + i -= len(m.KeyLength) + copy(dAtA[i:], m.KeyLength) + i = encodeVarint(dAtA, i, uint64(len(m.KeyLength))) + i-- + dAtA[i] = 0x62 + } + if len(m.UsedKeyParts) > 0 { + for iNdEx := len(m.UsedKeyParts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UsedKeyParts[iNdEx]) + copy(dAtA[i:], m.UsedKeyParts[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.UsedKeyParts[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x52 + } + if len(m.PossibleKeys) > 0 { + for iNdEx := len(m.PossibleKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PossibleKeys[iNdEx]) + copy(dAtA[i:], m.PossibleKeys[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.PossibleKeys[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if m.Insert { + i-- + if m.Insert { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.UsedColumns) > 0 { + for iNdEx := len(m.UsedColumns) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UsedColumns[iNdEx]) + copy(dAtA[i:], m.UsedColumns[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.UsedColumns[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.CostInfo) > 0 { + for k := range m.CostInfo { + v := m.CostInfo[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Filtered) > 0 { + i -= len(m.Filtered) + copy(dAtA[i:], m.Filtered) + i = encodeVarint(dAtA, i, uint64(len(m.Filtered))) + i-- + dAtA[i] = 0x2a + } + if m.RowsProducedPerJoin != 0 { + i = encodeVarint(dAtA, i, uint64(m.RowsProducedPerJoin)) + i-- + dAtA[i] = 0x20 + } + if m.RowsExaminedPerScan != 0 { + i = encodeVarint(dAtA, i, uint64(m.RowsExaminedPerScan)) + i-- + dAtA[i] = 0x18 + } + if len(m.AccessType) > 0 { + i -= len(m.AccessType) + copy(dAtA[i:], m.AccessType) + i = encodeVarint(dAtA, i, uint64(len(m.AccessType))) + i-- + dAtA[i] = 0x12 + } + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarint(dAtA, i, uint64(len(m.TableName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_NestedLoopObj) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_NestedLoopObj) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MySQLExplain_NestedLoopObj) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_OrderingOperation) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_OrderingOperation) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MySQLExplain_OrderingOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.NestedLoop) > 0 { + for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.CostInfo) > 0 { + for k := range m.CostInfo { + v := m.CostInfo[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if m.UsingFilesort { + i-- + if m.UsingFilesort { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MySQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.QueryBlock != nil { + size, err := m.QueryBlock.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= sov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Parameter) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Parameter) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Number != 0 { + i = encodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Config) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Config) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Config) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Queries) > 0 { + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Queries[iNdEx]) + copy(dAtA[i:], m.Queries[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Schema) > 0 { + for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Schema[iNdEx]) + copy(dAtA[i:], m.Schema[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Engine) > 0 { + i -= len(m.Engine) + copy(dAtA[i:], m.Engine) + i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Query) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Query) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Query) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Params) > 0 { + for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Params[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Cmd) > 0 { + i -= len(m.Cmd) + copy(dAtA[i:], m.Cmd) + i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sql) > 0 { + i -= len(m.Sql) + copy(dAtA[i:], m.Sql) + i = encodeVarint(dAtA, i, uint64(len(m.Sql))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQL) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQL) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *PostgreSQL) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQLExplain_Plan) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQLExplain_Plan) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *PostgreSQLExplain_Plan) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.IndexCond) > 0 { + i -= len(m.IndexCond) + copy(dAtA[i:], m.IndexCond) + i = encodeVarint(dAtA, i, uint64(len(m.IndexCond))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf2 + } + if len(m.ScanDirection) > 0 { + i -= len(m.ScanDirection) + copy(dAtA[i:], m.ScanDirection) + i = encodeVarint(dAtA, i, uint64(len(m.ScanDirection))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } + if len(m.IndexName) > 0 { + i -= len(m.IndexName) + copy(dAtA[i:], m.IndexName) + i = encodeVarint(dAtA, i, uint64(len(m.IndexName))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + } + if len(m.HashCond) > 0 { + i -= len(m.HashCond) + copy(dAtA[i:], m.HashCond) + i = encodeVarint(dAtA, i, uint64(len(m.HashCond))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + } + if m.InnerUnique { + i-- + if m.InnerUnique { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 + } + if len(m.JoinType) > 0 { + i -= len(m.JoinType) + copy(dAtA[i:], m.JoinType) + i = encodeVarint(dAtA, i, uint64(len(m.JoinType))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + if len(m.SortKey) > 0 { + for iNdEx := len(m.SortKey) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SortKey[iNdEx]) + copy(dAtA[i:], m.SortKey[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.SortKey[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + } + if m.TempWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 + } + if m.TempReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } + if m.LocalWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if m.LocalDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } + if m.LocalReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + if m.LocalHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.SharedWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.SharedDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if m.SharedReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) + i-- + dAtA[i] = 0x78 + } + if m.SharedHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) + i-- + dAtA[i] = 0x70 + } + if len(m.Plans) > 0 { + for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Plans[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x6a + } + } + if len(m.Output) > 0 { + for iNdEx := len(m.Output) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Output[iNdEx]) + copy(dAtA[i:], m.Output[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Output[iNdEx]))) + i-- + dAtA[i] = 0x62 + } + } + if m.PlanWidth != 0 { + i = encodeVarint(dAtA, i, uint64(m.PlanWidth)) + i-- + dAtA[i] = 0x58 + } + if m.PlanRows != 0 { + i = encodeVarint(dAtA, i, uint64(m.PlanRows)) + i-- + dAtA[i] = 0x50 + } + if m.TotalCost != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) + i-- + dAtA[i] = 0x4d + } + if m.StartupCost != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) + i-- + dAtA[i] = 0x45 + } + if m.AsyncCapable { + i-- + if m.AsyncCapable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.ParallelAware { + i-- + if m.ParallelAware { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.Alias) > 0 { + i -= len(m.Alias) + copy(dAtA[i:], m.Alias) + i = encodeVarint(dAtA, i, uint64(len(m.Alias))) + i-- + dAtA[i] = 0x2a + } + if len(m.Schema) > 0 { + i -= len(m.Schema) + copy(dAtA[i:], m.Schema) + i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + i-- + dAtA[i] = 0x22 + } + if len(m.RelationName) > 0 { + i -= len(m.RelationName) + copy(dAtA[i:], m.RelationName) + i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) + i-- + dAtA[i] = 0x1a + } + if len(m.ParentRelationship) > 0 { + i -= len(m.ParentRelationship) + copy(dAtA[i:], m.ParentRelationship) + i = encodeVarint(dAtA, i, uint64(len(m.ParentRelationship))) + i-- + dAtA[i] = 0x12 + } + if len(m.NodeType) > 0 { + i -= len(m.NodeType) + copy(dAtA[i:], m.NodeType) + i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQLExplain_Planning) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQLExplain_Planning) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *PostgreSQLExplain_Planning) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.TempWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) + i-- + dAtA[i] = 0x50 + } + if m.TempReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) + i-- + dAtA[i] = 0x48 + } + if m.LocalWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) + i-- + dAtA[i] = 0x40 + } + if m.LocalDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) + i-- + dAtA[i] = 0x38 + } + if m.LocalReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) + i-- + dAtA[i] = 0x30 + } + if m.LocalHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) + i-- + dAtA[i] = 0x28 + } + if m.SharedWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) + i-- + dAtA[i] = 0x20 + } + if m.SharedDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) + i-- + dAtA[i] = 0x18 + } + if m.SharedReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) + i-- + dAtA[i] = 0x10 + } + if m.SharedHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PostgreSQLExplain) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostgreSQLExplain) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *PostgreSQLExplain) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Planning != nil { + size, err := m.Planning.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Settings) > 0 { + for k := range m.Settings { + v := m.Settings[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if m.Plan != nil { + size, err := m.Plan.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQL) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQL) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MySQL) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_QueryBlock) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_QueryBlock) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MySQLExplain_QueryBlock) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.NestedLoop) > 0 { + for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if m.OrderingOperation != nil { + size, err := m.OrderingOperation.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.CostInfo) > 0 { + for k := range m.CostInfo { + v := m.CostInfo[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.SelectId != 0 { + i = encodeVarint(dAtA, i, uint64(m.SelectId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_Table) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_Table) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MySQLExplain_Table) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Ref) > 0 { + for iNdEx := len(m.Ref) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ref[iNdEx]) + copy(dAtA[i:], m.Ref[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Ref[iNdEx]))) + i-- + dAtA[i] = 0x6a + } + } + if len(m.KeyLength) > 0 { + i -= len(m.KeyLength) + copy(dAtA[i:], m.KeyLength) + i = encodeVarint(dAtA, i, uint64(len(m.KeyLength))) + i-- + dAtA[i] = 0x62 + } + if len(m.UsedKeyParts) > 0 { + for iNdEx := len(m.UsedKeyParts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UsedKeyParts[iNdEx]) + copy(dAtA[i:], m.UsedKeyParts[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.UsedKeyParts[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x52 + } + if len(m.PossibleKeys) > 0 { + for iNdEx := len(m.PossibleKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PossibleKeys[iNdEx]) + copy(dAtA[i:], m.PossibleKeys[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.PossibleKeys[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if m.Insert { + i-- + if m.Insert { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.UsedColumns) > 0 { + for iNdEx := len(m.UsedColumns) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UsedColumns[iNdEx]) + copy(dAtA[i:], m.UsedColumns[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.UsedColumns[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.CostInfo) > 0 { + for k := range m.CostInfo { + v := m.CostInfo[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Filtered) > 0 { + i -= len(m.Filtered) + copy(dAtA[i:], m.Filtered) + i = encodeVarint(dAtA, i, uint64(len(m.Filtered))) + i-- + dAtA[i] = 0x2a + } + if m.RowsProducedPerJoin != 0 { + i = encodeVarint(dAtA, i, uint64(m.RowsProducedPerJoin)) + i-- + dAtA[i] = 0x20 + } + if m.RowsExaminedPerScan != 0 { + i = encodeVarint(dAtA, i, uint64(m.RowsExaminedPerScan)) + i-- + dAtA[i] = 0x18 + } + if len(m.AccessType) > 0 { + i -= len(m.AccessType) + copy(dAtA[i:], m.AccessType) + i = encodeVarint(dAtA, i, uint64(len(m.AccessType))) + i-- + dAtA[i] = 0x12 + } + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarint(dAtA, i, uint64(len(m.TableName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_NestedLoopObj) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_NestedLoopObj) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MySQLExplain_NestedLoopObj) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain_OrderingOperation) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain_OrderingOperation) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MySQLExplain_OrderingOperation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.NestedLoop) > 0 { + for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.CostInfo) > 0 { + for k := range m.CostInfo { + v := m.CostInfo[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if m.UsingFilesort { + i-- + if m.UsingFilesort { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MySQLExplain) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MySQLExplain) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MySQLExplain) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.QueryBlock != nil { + size, err := m.QueryBlock.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Parameter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Number != 0 { + n += 1 + sov(uint64(m.Number)) + } + n += len(m.unknownFields) + return n +} + +func (m *Config) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Engine) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Schema) > 0 { + for _, s := range m.Schema { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Queries) > 0 { + for _, s := range m.Queries { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Query) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sql) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Cmd) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Params) > 0 { + for _, e := range m.Params { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *PostgreSQL) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Explain != nil { + l = m.Explain.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *PostgreSQLExplain_Plan) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeType) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.ParentRelationship) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.RelationName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Schema) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Alias) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.ParallelAware { + n += 2 + } + if m.AsyncCapable { + n += 2 + } + if m.StartupCost != 0 { + n += 5 + } + if m.TotalCost != 0 { + n += 5 + } + if m.PlanRows != 0 { + n += 1 + sov(uint64(m.PlanRows)) + } + if m.PlanWidth != 0 { + n += 1 + sov(uint64(m.PlanWidth)) + } + if len(m.Output) > 0 { + for _, s := range m.Output { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Plans) > 0 { + for _, e := range m.Plans { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.SharedHitBlocks != 0 { + n += 1 + sov(uint64(m.SharedHitBlocks)) + } + if m.SharedReadBlocks != 0 { + n += 1 + sov(uint64(m.SharedReadBlocks)) + } + if m.SharedDirtiedBlocks != 0 { + n += 2 + sov(uint64(m.SharedDirtiedBlocks)) + } + if m.SharedWrittenBlocks != 0 { + n += 2 + sov(uint64(m.SharedWrittenBlocks)) + } + if m.LocalHitBlocks != 0 { + n += 2 + sov(uint64(m.LocalHitBlocks)) + } + if m.LocalReadBlocks != 0 { + n += 2 + sov(uint64(m.LocalReadBlocks)) + } + if m.LocalDirtiedBlocks != 0 { + n += 2 + sov(uint64(m.LocalDirtiedBlocks)) + } + if m.LocalWrittenBlocks != 0 { + n += 2 + sov(uint64(m.LocalWrittenBlocks)) + } + if m.TempReadBlocks != 0 { + n += 2 + sov(uint64(m.TempReadBlocks)) + } + if m.TempWrittenBlocks != 0 { + n += 2 + sov(uint64(m.TempWrittenBlocks)) + } + if len(m.SortKey) > 0 { + for _, s := range m.SortKey { + l = len(s) + n += 2 + l + sov(uint64(l)) + } + } + l = len(m.JoinType) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + if m.InnerUnique { + n += 3 + } + l = len(m.HashCond) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + l = len(m.IndexName) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + l = len(m.ScanDirection) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + l = len(m.IndexCond) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *PostgreSQLExplain_Planning) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SharedHitBlocks != 0 { + n += 1 + sov(uint64(m.SharedHitBlocks)) + } + if m.SharedReadBlocks != 0 { + n += 1 + sov(uint64(m.SharedReadBlocks)) + } + if m.SharedDirtiedBlocks != 0 { + n += 1 + sov(uint64(m.SharedDirtiedBlocks)) + } + if m.SharedWrittenBlocks != 0 { + n += 1 + sov(uint64(m.SharedWrittenBlocks)) + } + if m.LocalHitBlocks != 0 { + n += 1 + sov(uint64(m.LocalHitBlocks)) + } + if m.LocalReadBlocks != 0 { + n += 1 + sov(uint64(m.LocalReadBlocks)) + } + if m.LocalDirtiedBlocks != 0 { + n += 1 + sov(uint64(m.LocalDirtiedBlocks)) + } + if m.LocalWrittenBlocks != 0 { + n += 1 + sov(uint64(m.LocalWrittenBlocks)) + } + if m.TempReadBlocks != 0 { + n += 1 + sov(uint64(m.TempReadBlocks)) + } + if m.TempWrittenBlocks != 0 { + n += 1 + sov(uint64(m.TempWrittenBlocks)) + } + n += len(m.unknownFields) + return n +} + +func (m *PostgreSQLExplain) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Plan != nil { + l = m.Plan.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.Settings) > 0 { + for k, v := range m.Settings { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.Planning != nil { + l = m.Planning.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MySQL) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Explain != nil { + l = m.Explain.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MySQLExplain_QueryBlock) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SelectId != 0 { + n += 1 + sov(uint64(m.SelectId)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.CostInfo) > 0 { + for k, v := range m.CostInfo { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.Table != nil { + l = m.Table.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.OrderingOperation != nil { + l = m.OrderingOperation.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.NestedLoop) > 0 { + for _, e := range m.NestedLoop { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *MySQLExplain_Table) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TableName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.AccessType) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.RowsExaminedPerScan != 0 { + n += 1 + sov(uint64(m.RowsExaminedPerScan)) + } + if m.RowsProducedPerJoin != 0 { + n += 1 + sov(uint64(m.RowsProducedPerJoin)) + } + l = len(m.Filtered) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.CostInfo) > 0 { + for k, v := range m.CostInfo { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if len(m.UsedColumns) > 0 { + for _, s := range m.UsedColumns { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.Insert { + n += 2 + } + if len(m.PossibleKeys) > 0 { + for _, s := range m.PossibleKeys { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.UsedKeyParts) > 0 { + for _, s := range m.UsedKeyParts { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + l = len(m.KeyLength) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Ref) > 0 { + for _, s := range m.Ref { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *MySQLExplain_NestedLoopObj) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Table != nil { + l = m.Table.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MySQLExplain_OrderingOperation) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UsingFilesort { + n += 2 + } + if len(m.CostInfo) > 0 { + for k, v := range m.CostInfo { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.Table != nil { + l = m.Table.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.NestedLoop) > 0 { + for _, e := range m.NestedLoop { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *MySQLExplain) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.QueryBlock != nil { + l = m.QueryBlock.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} +func soz(x uint64) (n int) { + return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Parameter) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Config) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Config: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Engine = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Query) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Query: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sql", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sql = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cmd = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Params = append(m.Params, &Parameter{}) + if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PostgreSQL) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PostgreSQL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PostgreSQL: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &PostgreSQLExplain{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PostgreSQLExplain_Plan) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PostgreSQLExplain_Plan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PostgreSQLExplain_Plan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentRelationship", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentRelationship = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelationName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Schema = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Alias = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ParallelAware", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ParallelAware = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsyncCapable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AsyncCapable = bool(v != 0) + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StartupCost", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StartupCost = float32(math.Float32frombits(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalCost", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TotalCost = float32(math.Float32frombits(v)) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PlanRows", wireType) + } + m.PlanRows = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PlanRows |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PlanWidth", wireType) + } + m.PlanWidth = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PlanWidth |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Output = append(m.Output, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Plans = append(m.Plans, &PostgreSQLExplain_Plan{}) + if err := m.Plans[len(m.Plans)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) + } + m.SharedHitBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedHitBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) + } + m.SharedReadBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedReadBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) + } + m.SharedDirtiedBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) + } + m.SharedWrittenBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedWrittenBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) + } + m.LocalHitBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalHitBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) + } + m.LocalReadBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalReadBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) + } + m.LocalDirtiedBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalDirtiedBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) + } + m.LocalWrittenBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalWrittenBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) + } + m.TempReadBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TempReadBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) + } + m.TempWrittenBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TempWrittenBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SortKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SortKey = append(m.SortKey, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JoinType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InnerUnique", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.InnerUnique = bool(v != 0) + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HashCond", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HashCond = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IndexName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScanDirection", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScanDirection = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 30: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexCond", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IndexCond = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PostgreSQLExplain_Planning: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PostgreSQLExplain_Planning: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) + } + m.SharedHitBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedHitBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) + } + m.SharedReadBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedReadBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) + } + m.SharedDirtiedBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) + } + m.SharedWrittenBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedWrittenBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) + } + m.LocalHitBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalHitBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) + } + m.LocalReadBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalReadBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) + } + m.LocalDirtiedBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalDirtiedBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) + } + m.LocalWrittenBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalWrittenBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) + } + m.TempReadBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TempReadBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) + } + m.TempWrittenBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TempWrittenBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PostgreSQLExplain) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PostgreSQLExplain: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PostgreSQLExplain: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Plan == nil { + m.Plan = &PostgreSQLExplain_Plan{} + } + if err := m.Plan.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Settings == nil { + m.Settings = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Settings[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Planning", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Planning == nil { + m.Planning = &PostgreSQLExplain_Planning{} + } + if err := m.Planning.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MySQL) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MySQL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MySQL: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &MySQLExplain{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MySQLExplain_QueryBlock) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MySQLExplain_QueryBlock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MySQLExplain_QueryBlock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectId", wireType) + } + m.SelectId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SelectId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CostInfo == nil { + m.CostInfo = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CostInfo[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Table == nil { + m.Table = &MySQLExplain_Table{} + } + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderingOperation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OrderingOperation == nil { + m.OrderingOperation = &MySQLExplain_OrderingOperation{} + } + if err := m.OrderingOperation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NestedLoop = append(m.NestedLoop, &MySQLExplain_NestedLoopObj{}) + if err := m.NestedLoop[len(m.NestedLoop)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MySQLExplain_Table: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MySQLExplain_Table: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccessType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RowsExaminedPerScan", wireType) + } + m.RowsExaminedPerScan = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RowsExaminedPerScan |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RowsProducedPerJoin", wireType) + } + m.RowsProducedPerJoin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RowsProducedPerJoin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filtered", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filtered = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CostInfo == nil { + m.CostInfo = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CostInfo[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsedColumns", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UsedColumns = append(m.UsedColumns, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Insert", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Insert = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PossibleKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PossibleKeys = append(m.PossibleKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsedKeyParts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UsedKeyParts = append(m.UsedKeyParts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyLength", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyLength = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ref = append(m.Ref, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MySQLExplain_NestedLoopObj) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MySQLExplain_NestedLoopObj: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MySQLExplain_NestedLoopObj: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Table == nil { + m.Table = &MySQLExplain_Table{} + } + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MySQLExplain_OrderingOperation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MySQLExplain_OrderingOperation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UsingFilesort", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UsingFilesort = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CostInfo == nil { + m.CostInfo = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CostInfo[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Table == nil { + m.Table = &MySQLExplain_Table{} + } + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NestedLoop = append(m.NestedLoop, &MySQLExplain_NestedLoopObj{}) + if err := m.NestedLoop[len(m.NestedLoop)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MySQLExplain) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MySQLExplain: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MySQLExplain: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.QueryBlock == nil { + m.QueryBlock = &MySQLExplain_QueryBlock{} + } + if err := m.QueryBlock.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skip(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLength + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLength + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflow = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index 55fff26d20..1e97a10640 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -204,133 +204,4 @@ message CodeGenRequest message CodeGenResponse { repeated File files = 1 [json_name="files"]; -} - -message VetParameter -{ - int32 number = 1 [json_name="number"]; -} - -message VetConfig -{ - string version = 1 [json_name="version"]; - string engine = 2 [json_name="engine"]; - repeated string schema = 3 [json_name="schema"]; - repeated string queries = 4 [json_name="queries"]; -} - -message VetQuery -{ - string sql = 1 [json_name="sql"]; - string name = 2 [json_name="name"]; - string cmd = 3 [json_name="cmd"]; - repeated VetParameter params = 4 [json_name="parameters"]; -} - -message PostgreSQL { - PostgreSQLExplain explain = 1; -} - -message PostgreSQLExplain { - Plan plan = 1 [json_name="Plan"]; - map settings = 2 [json_name="Settings"]; - Planning planning = 3 [json_name="Planning"]; - - message Plan { - string node_type = 1 [json_name="Node Type"]; - string parent_relationship = 2 [json_name="Parent Relationship"]; - string relation_name = 3 [json_name="Relation Name"]; - string schema = 4 [json_name="Schema"]; - string alias = 5 [json_name="Alias"]; - bool parallel_aware = 6 [json_name="Parallel Aware"]; - bool async_capable = 7 [json_name="Async Capable"]; - float startup_cost = 8 [json_name="Startup Cost"]; - float total_cost = 9 [json_name="Total Cost"]; - uint64 plan_rows = 10 [json_name="Plan Rows"]; - uint64 plan_width = 11 [json_name="Plan Width"]; - repeated string output = 12 [json_name="Output"]; - repeated Plan plans = 13 [json_name="Plans"]; - - // Embedded "Blocks" fields - uint64 shared_hit_blocks = 14 [json_name="Shared Hit Blocks"]; - uint64 shared_read_blocks = 15 [json_name="Shared Read Blocks"]; - uint64 shared_dirtied_blocks = 16 [json_name="Shared Dirtied Blocks"]; - uint64 shared_written_blocks = 17 [json_name="Shared Written Blocks"]; - uint64 local_hit_blocks = 18 [json_name="Local Hit Blocks"]; - uint64 local_read_blocks = 19 [json_name="Local Read Blocks"]; - uint64 local_dirtied_blocks = 20 [json_name="Local Dirtied Blocks"]; - uint64 local_written_blocks = 21 [json_name="Local Written Blocks"]; - uint64 temp_read_blocks = 22 [json_name="Temp Read Blocks"]; - uint64 temp_written_blocks = 23 [json_name="Temp Written Blocks"]; - - // "Node Type": "Sort" fields - repeated string sort_key = 24 [json_name="Sort Key"]; - - // "Node Type": "Hash Join" fields - string join_type = 25 [json_name="Join Type"]; - bool inner_unique = 26 [json_name="Inner Unique"]; - string hash_cond = 27 [json_name="Hash Cond"]; - - // "Node Type": "Index Scan" fields - string index_name = 28 [json_name="Index Name"]; - string scan_direction = 29 [json_name="Scan Direction"]; - string index_cond = 30 [json_name="Index Cond"]; - } - - message Planning { - uint64 shared_hit_blocks = 1 [json_name="Shared Hit Blocks"]; - uint64 shared_read_blocks = 2 [json_name="Shared Read Blocks"]; - uint64 shared_dirtied_blocks = 3 [json_name="Shared Dirtied Blocks"]; - uint64 shared_written_blocks = 4 [json_name="Shared Written Blocks"]; - uint64 local_hit_blocks = 5 [json_name="Local Hit Blocks"]; - uint64 local_read_blocks = 6 [json_name="Local Read Blocks"]; - uint64 local_dirtied_blocks = 7 [json_name="Local Dirtied Blocks"]; - uint64 local_written_blocks = 8 [json_name="Local Written Blocks"]; - uint64 temp_read_blocks = 9 [json_name="Temp Read Blocks"]; - uint64 temp_written_blocks = 10 [json_name="Temp Written Blocks"]; - } -} - -message MySQL { - MySQLExplain explain = 1; -} - -message MySQLExplain { - QueryBlock query_block = 1; - - message QueryBlock { - uint64 select_id = 1; - string message = 2; - map cost_info = 3; - Table table = 4; - OrderingOperation ordering_operation = 5; - repeated NestedLoopObj nested_loop = 6; - } - - message Table { - string table_name = 1; - string access_type = 2; - uint64 rows_examined_per_scan = 3; - uint64 rows_produced_per_join = 4; - string filtered = 5; - map cost_info = 6; - repeated string used_columns = 7; - bool insert = 8; - repeated string possible_keys = 9; - string key = 10; - repeated string used_key_parts = 11; - string key_length = 12; - repeated string ref = 13; - } - - message NestedLoopObj { - Table table = 1; - } - - message OrderingOperation { - bool using_filesort = 1; - map cost_info = 2; - Table table = 3; - repeated NestedLoopObj nested_loop = 4; - } } \ No newline at end of file diff --git a/protos/vet/vet.proto b/protos/vet/vet.proto new file mode 100644 index 0000000000..24400cf12d --- /dev/null +++ b/protos/vet/vet.proto @@ -0,0 +1,134 @@ +syntax = "proto3"; + +package vet; + +option go_package = "github.com/kyleconroy/sqlc/internal/vet"; + +message Parameter +{ + int32 number = 1 [json_name="number"]; +} + +message Config +{ + string version = 1 [json_name="version"]; + string engine = 2 [json_name="engine"]; + repeated string schema = 3 [json_name="schema"]; + repeated string queries = 4 [json_name="queries"]; +} + +message Query +{ + string sql = 1 [json_name="sql"]; + string name = 2 [json_name="name"]; + string cmd = 3 [json_name="cmd"]; + repeated Parameter params = 4 [json_name="parameters"]; +} + +message PostgreSQL { + PostgreSQLExplain explain = 1; +} + +message PostgreSQLExplain { + Plan plan = 1 [json_name="Plan"]; + map settings = 2 [json_name="Settings"]; + Planning planning = 3 [json_name="Planning"]; + + message Plan { + string node_type = 1 [json_name="Node Type"]; + string parent_relationship = 2 [json_name="Parent Relationship"]; + string relation_name = 3 [json_name="Relation Name"]; + string schema = 4 [json_name="Schema"]; + string alias = 5 [json_name="Alias"]; + bool parallel_aware = 6 [json_name="Parallel Aware"]; + bool async_capable = 7 [json_name="Async Capable"]; + float startup_cost = 8 [json_name="Startup Cost"]; + float total_cost = 9 [json_name="Total Cost"]; + uint64 plan_rows = 10 [json_name="Plan Rows"]; + uint64 plan_width = 11 [json_name="Plan Width"]; + repeated string output = 12 [json_name="Output"]; + repeated Plan plans = 13 [json_name="Plans"]; + + // Embedded "Blocks" fields + uint64 shared_hit_blocks = 14 [json_name="Shared Hit Blocks"]; + uint64 shared_read_blocks = 15 [json_name="Shared Read Blocks"]; + uint64 shared_dirtied_blocks = 16 [json_name="Shared Dirtied Blocks"]; + uint64 shared_written_blocks = 17 [json_name="Shared Written Blocks"]; + uint64 local_hit_blocks = 18 [json_name="Local Hit Blocks"]; + uint64 local_read_blocks = 19 [json_name="Local Read Blocks"]; + uint64 local_dirtied_blocks = 20 [json_name="Local Dirtied Blocks"]; + uint64 local_written_blocks = 21 [json_name="Local Written Blocks"]; + uint64 temp_read_blocks = 22 [json_name="Temp Read Blocks"]; + uint64 temp_written_blocks = 23 [json_name="Temp Written Blocks"]; + + // "Node Type": "Sort" fields + repeated string sort_key = 24 [json_name="Sort Key"]; + + // "Node Type": "Hash Join" fields + string join_type = 25 [json_name="Join Type"]; + bool inner_unique = 26 [json_name="Inner Unique"]; + string hash_cond = 27 [json_name="Hash Cond"]; + + // "Node Type": "Index Scan" fields + string index_name = 28 [json_name="Index Name"]; + string scan_direction = 29 [json_name="Scan Direction"]; + string index_cond = 30 [json_name="Index Cond"]; + } + + message Planning { + uint64 shared_hit_blocks = 1 [json_name="Shared Hit Blocks"]; + uint64 shared_read_blocks = 2 [json_name="Shared Read Blocks"]; + uint64 shared_dirtied_blocks = 3 [json_name="Shared Dirtied Blocks"]; + uint64 shared_written_blocks = 4 [json_name="Shared Written Blocks"]; + uint64 local_hit_blocks = 5 [json_name="Local Hit Blocks"]; + uint64 local_read_blocks = 6 [json_name="Local Read Blocks"]; + uint64 local_dirtied_blocks = 7 [json_name="Local Dirtied Blocks"]; + uint64 local_written_blocks = 8 [json_name="Local Written Blocks"]; + uint64 temp_read_blocks = 9 [json_name="Temp Read Blocks"]; + uint64 temp_written_blocks = 10 [json_name="Temp Written Blocks"]; + } +} + +message MySQL { + MySQLExplain explain = 1; +} + +message MySQLExplain { + QueryBlock query_block = 1; + + message QueryBlock { + uint64 select_id = 1; + string message = 2; + map cost_info = 3; + Table table = 4; + OrderingOperation ordering_operation = 5; + repeated NestedLoopObj nested_loop = 6; + } + + message Table { + string table_name = 1; + string access_type = 2; + uint64 rows_examined_per_scan = 3; + uint64 rows_produced_per_join = 4; + string filtered = 5; + map cost_info = 6; + repeated string used_columns = 7; + bool insert = 8; + repeated string possible_keys = 9; + string key = 10; + repeated string used_key_parts = 11; + string key_length = 12; + repeated string ref = 13; + } + + message NestedLoopObj { + Table table = 1; + } + + message OrderingOperation { + bool using_filesort = 1; + map cost_info = 2; + Table table = 3; + repeated NestedLoopObj nested_loop = 4; + } +} From 9e5a64c25c1b23d8904d7bc5973e9296e63d1d4c Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Mon, 24 Jul 2023 15:56:41 -0700 Subject: [PATCH 2/2] Fix cel.Types --- internal/cmd/vet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index 9c4123d0b0..8910373ef6 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -80,8 +80,8 @@ func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) err cel.Types( &vet.Config{}, &vet.Query{}, - &vet.PostgreSQLExplain{}, - &vet.MySQLExplain{}, + &vet.PostgreSQL{}, + &vet.MySQL{}, ), cel.Variable("query", cel.ObjectType("vet.Query"),