diff --git a/docs/howto/vet.md b/docs/howto/vet.md index 087bde83e9..38b3269a88 100644 --- a/docs/howto/vet.md +++ b/docs/howto/vet.md @@ -11,8 +11,8 @@ If an expression evaluates to `true`, `sqlc vet` will report an error using the ## Defining lint rules -Each lint rule's CEL expression has access to variables from your sqlc configuration and queries, -defined in the following struct. +Each lint rule's CEL expression has access to information from your sqlc configuration and queries +via variables defined in the following proto messages. ```proto message Config @@ -41,12 +41,17 @@ message Parameter } ``` -This struct will likely expand in the future to include more query information. -We may also add information returned from a running database, such as the result from -`EXPLAIN ...`. +In addition to this basic information, when you have a PostgreSQL or MySQL +[database connection configured](../reference/config.html#database) +each CEL expression has access to the output from running `EXPLAIN ...` on your query +via the `postgresql.explain` and `mysql.explain` variables. +This output is quite complex and depends on the structure of your query but sqlc attempts +to parse and provide as much information as it can. See +[Rules using `EXPLAIN ...` output](#rules-using-explain-output) for more information. -While these examples are simplistic, they give you a flavor of the types of -rules you can write. +Here are a few example rules just using the basic configuration and query information available +to the CEL expression environment. While these examples are simplistic, they give you a flavor +of the types of rules you can write. ```yaml version: 2 @@ -82,6 +87,82 @@ rules: query.cmd == "exec" ``` +### Rules using `EXPLAIN ...` output + +The CEL expression environment has two variables containing `EXPLAIN ...` output, +`postgresql.explain` and `mysql.explain`. `sqlc` only populates the variable associated with +your configured database engine, and only when you have a +[database connection configured](../reference/config.html#database). + +For the `postgresql` engine, `sqlc` runs + +```sql +EXPLAIN (ANALYZE false, VERBOSE, COSTS, SETTINGS, BUFFERS, FORMAT JSON) ... +``` + +where `"..."` is your query string, and parses the output into a `PostgreSQLExplain` proto message. + +For the `mysql` engine, `sqlc` runs + +```sql +EXPLAIN FORMAT=JSON ... +``` + +where `"..."` is your query string, and parses the output into a `MySQLExplain` proto message. + +These proto message definitions are too long to include here, but you can find them in the `protos` +directory within the `sqlc` source tree. + +The output from `EXPLAIN ...` depends on the structure of your query so it's a bit difficult +to offer generic examples. Refer to the +[PostgreSQL documentation](https://www.postgresql.org/docs/current/using-explain.html) and +[MySQL documentation](https://dev.mysql.com/doc/refman/en/explain-output.html) for more +information. + +```yaml +... +rules: +- name: postgresql-query-too-costly + message: "Query cost estimate is too high" + rule: "postgresql.explain.plan.total_cost > 1.0" +- name: postgresql-no-seq-scan + message: "Query plan results in a sequential scan" + rule: "postgresql.explain.plan.node_type == 'Seq Scan'" +- name: mysql-query-too-costly + message: "Query cost estimate is too high" + rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" +- name: mysql-must-use-primary-key + message: "Query plan doesn't use primary key" + rule: "has(mysql.explain.query_block.table.key) && mysql.explain.query_block.table.key != 'PRIMARY'" +``` + +When building rules that depend on `EXPLAIN ...` output, it may be helpful to see the actual JSON +returned from the database. `sqlc` will print it When you set the environment variable +`SQLCDEBUG=dumpexplain=1`. Use this environment variable together with a dummy rule to see +`EXPLAIN ...` output for all of your queries. + +```yaml +version: 2 +sql: + - schema: "query.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + package: "db" + out: "db" + rules: + - debug +rules: +- name: debug + message: "Debug" + rule: has(postgresql.explain) +``` + +Please note that `sqlc` does not manage or migrate your database. Use your +migration tool of choice to create the necessary database tables and objects +before running `sqlc vet` with rules that depend on `EXPLAIN ...` output. + ## Built-in rules ### sqlc/db-prepare diff --git a/docs/reference/environment-variables.md b/docs/reference/environment-variables.md index 36822531ab..535231c1e9 100644 --- a/docs/reference/environment-variables.md +++ b/docs/reference/environment-variables.md @@ -126,6 +126,13 @@ return an error. `SQLCDEBUG=processplugins=0` +### dumpexplain + +The `dumpexplain` command prints the JSON-formatted result from running +`EXPLAIN ...` on a query when a `sqlc vet` rule evaluation requires its output. + +`SQLCDEBUG=dumpexplain=1` + ## SQLCTMPDIR If specified, use the given directory as the base for temporary folders. Only diff --git a/examples/authors/sqlc.yaml b/examples/authors/sqlc.yaml index 2bebbd9595..d43fb976d6 100644 --- a/examples/authors/sqlc.yaml +++ b/examples/authors/sqlc.yaml @@ -7,6 +7,7 @@ sql: uri: postgresql://${PG_USER}:${PG_PASSWORD}@${PG_HOST}:${PG_PORT}/authors rules: - sqlc/db-prepare + - postgresql-query-too-costly gen: go: package: authors @@ -18,6 +19,7 @@ sql: uri: root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/authors?multiStatements=true&parseTime=true rules: - sqlc/db-prepare + # - mysql-query-too-costly gen: go: package: authors @@ -32,4 +34,11 @@ sql: gen: go: package: authors - out: sqlite \ No newline at end of file + out: sqlite +rules: +- name: postgresql-query-too-costly + message: "Too costly" + rule: "postgresql.explain.plan.total_cost > 300.0" +- name: mysql-query-too-costly + message: "Too costly" + rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" \ No newline at end of file diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index b35e050ce9..afe2f46f42 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -3,6 +3,7 @@ package cmd import ( "context" "database/sql" + "encoding/json" "errors" "fmt" "io" @@ -15,11 +16,11 @@ import ( _ "github.com/go-sql-driver/mysql" "github.com/google/cel-go/cel" - "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/ext" "github.com/jackc/pgx/v5" _ "github.com/mattn/go-sqlite3" "github.com/spf13/cobra" + "google.golang.org/protobuf/encoding/protojson" "github.com/kyleconroy/sqlc/internal/config" "github.com/kyleconroy/sqlc/internal/debug" @@ -31,20 +32,11 @@ import ( var ErrFailedChecks = errors.New("failed checks") +var pjson = protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + const RuleDbPrepare = "sqlc/db-prepare" const QueryFlagSqlcVetDisable = "@sqlc-vet-disable" -type emptyProgram struct { -} - -func (e *emptyProgram) Eval(any) (ref.Val, *cel.EvalDetails, error) { - return nil, nil, fmt.Errorf("unimplemented") -} - -func (e *emptyProgram) ContextEval(ctx context.Context, a any) (ref.Val, *cel.EvalDetails, error) { - return e.Eval(a) -} - func NewCmdVet() *cobra.Command { return &cobra.Command{ Use: "vet", @@ -87,6 +79,8 @@ func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) err cel.Types( &plugin.VetConfig{}, &plugin.VetQuery{}, + &plugin.PostgreSQLExplain{}, + &plugin.MySQLExplain{}, ), cel.Variable("query", cel.ObjectType("plugin.VetQuery"), @@ -94,22 +88,27 @@ func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) err cel.Variable("config", cel.ObjectType("plugin.VetConfig"), ), + cel.Variable("postgresql", + cel.ObjectType("plugin.PostgreSQL"), + ), + cel.Variable("mysql", + cel.ObjectType("plugin.MySQL"), + ), ) if err != nil { - return fmt.Errorf("new env: %s", err) + return fmt.Errorf("new CEL env error: %s", err) } - checks := map[string]cel.Program{ - RuleDbPrepare: &emptyProgram{}, // Keep this to trigger the name conflict error below + rules := map[string]rule{ + RuleDbPrepare: {NeedsPrepare: true}, } - msgs := map[string]string{} for _, c := range conf.Rules { if c.Name == "" { - return fmt.Errorf("checks require a name") + return fmt.Errorf("rules require a name") } - if _, found := checks[c.Name]; found { - return fmt.Errorf("type-check error: a check with the name '%s' already exists", c.Name) + if _, found := rules[c.Name]; found { + return fmt.Errorf("type-check error: a rule with the name '%s' already exists", c.Name) } if c.Rule == "" { return fmt.Errorf("type-check error: %s is empty", c.Name) @@ -122,17 +121,24 @@ func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) err if err != nil { return fmt.Errorf("program construction error: %s %s", c.Name, err) } - checks[c.Name] = prg - msgs[c.Name] = c.Msg + rule := rule{Program: &prg, Message: c.Msg} + + // TODO There's probably a nicer way to do this from the ast + // https://pkg.go.dev/github.com/google/cel-go/common/ast#AllMatcher + if strings.Contains(c.Rule, "postgresql.explain") || + strings.Contains(c.Rule, "mysql.explain") { + rule.NeedsExplain = true + } + + rules[c.Name] = rule } c := checker{ - Checks: checks, + Rules: rules, Conf: conf, Dir: dir, Env: env, Envmap: map[string]string{}, - Msgs: msgs, Stderr: stderr, NoDatabase: e.NoDatabase, } @@ -184,15 +190,34 @@ type preparer interface { Prepare(context.Context, string, string) error } -type pgxPreparer struct { +type pgxConn struct { c *pgx.Conn } -func (p *pgxPreparer) Prepare(ctx context.Context, name, query string) error { +func (p *pgxConn) Prepare(ctx context.Context, name, query string) error { _, err := p.c.Prepare(ctx, name, query) return err } +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 + eArgs := make([]any, len(args)) + row := p.c.QueryRow(ctx, eQuery, eArgs...) + var result []json.RawMessage + if err := row.Scan(&result); err != nil { + return nil, err + } + if debug.Debug.DumpExplain { + fmt.Println(eQuery) + fmt.Println(string(result[0])) + } + var explain plugin.PostgreSQLExplain + if err := pjson.Unmarshal(result[0], &explain); err != nil { + return nil, err + } + return &vetEngineOutput{PostgreSQL: &plugin.PostgreSQL{Explain: &explain}}, nil +} + type dbPreparer struct { db *sql.DB } @@ -203,13 +228,49 @@ func (p *dbPreparer) Prepare(ctx context.Context, name, query string) error { return err } +type explainer interface { + Explain(context.Context, string, ...*plugin.Parameter) (*vetEngineOutput, error) +} + +type mysqlExplainer struct { + *sql.DB +} + +func (me *mysqlExplainer) Explain(ctx context.Context, query string, args ...*plugin.Parameter) (*vetEngineOutput, error) { + eQuery := "EXPLAIN FORMAT=JSON "+query + eArgs := make([]any, len(args)) + row := me.QueryRowContext(ctx, eQuery, eArgs...) + var result json.RawMessage + if err := row.Scan(&result); err != nil { + return nil, err + } + if debug.Debug.DumpExplain { + fmt.Println(eQuery) + fmt.Println(string(result)) + } + var explain plugin.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 +} + +type rule struct { + Program *cel.Program + Message string + NeedsPrepare bool + NeedsExplain bool +} + type checker struct { - Checks map[string]cel.Program + Rules map[string]rule Conf *config.Config Dir string Env *cel.Env Envmap map[string]string - Msgs map[string]string Stderr io.Writer NoDatabase bool } @@ -253,7 +314,8 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } var prep preparer - if s.Database != nil { + var expl explainer + if s.Database != nil { // TODO only set up a database connection if a rule evaluation requires it if c.NoDatabase { return fmt.Errorf("database: connections disabled via command line flag") } @@ -271,7 +333,9 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { return fmt.Errorf("database: connection error: %s", err) } defer conn.Close(ctx) - prep = &pgxPreparer{conn} + pConn := &pgxConn{conn} + prep = pConn + expl = pConn case config.EngineMySQL: db, err := sql.Open("mysql", dburl) if err != nil { @@ -282,6 +346,7 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } defer db.Close() prep = &dbPreparer{db} + expl = &mysqlExplainer{db} case config.EngineSQLite: db, err := sql.Open("sqlite3", dburl) if err != nil { @@ -292,6 +357,9 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } defer db.Close() prep = &dbPreparer{db} + // SQLite really doesn't want us to depend on the output of EXPLAIN + // QUERY PLAN: https://www.sqlite.org/eqp.html + expl = nil default: return fmt.Errorf("unsupported database uri: %s", s.Engine) } @@ -307,37 +375,62 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } continue } - q := vetQuery(query) + + evalMap := map[string]any{ + "query": vetQuery(query), + "config": cfg, + } + for _, name := range s.Rules { - // Built-in rule - if name == RuleDbPrepare { + rule, ok := c.Rules[name] + if !ok { + return fmt.Errorf("type-check error: a rule with the name '%s' does not exist", name) + } + + if rule.NeedsPrepare { if prep == nil { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: database connection required\n", query.Filename, q.Name, name) + fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: database connection required\n", query.Filename, query.Name, name) errored = true continue } - original := result.Queries[i] - if !prepareable(s, original.RawStmt) { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: %s\n", query.Filename, q.Name, name, "query type is unpreparable") + if !prepareable(s, result.Queries[i].RawStmt) { + fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: %s\n", query.Filename, query.Name, name, "query type is unpreparable") errored = true continue } name := fmt.Sprintf("sqlc_vet_%d_%d", time.Now().Unix(), i) if err := prep.Prepare(ctx, name, query.Text); err != nil { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: %s\n", query.Filename, q.Name, name, err) + fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: %s\n", query.Filename, query.Name, name, err) errored = true + continue } + } + + // short-circuit for "sqlc/db-prepare" rule which doesn't have a CEL program + if rule.Program == nil { continue } - prg, ok := c.Checks[name] - if !ok { - return fmt.Errorf("type-check error: a check with the name '%s' does not exist", name) + // Get explain output for this query if we need it + _, 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) + errored = true + continue + } + engineOutput, err := expl.Explain(ctx, query.Text, query.Params...) + if err != nil { + fmt.Fprintf(c.Stderr, "%s: %s: %s: error explaining query: %s\n", query.Filename, query.Name, name, err) + errored = true + continue + } + + evalMap["postgresql"] = engineOutput.PostgreSQL + evalMap["mysql"] = engineOutput.MySQL } - out, _, err := prg.Eval(map[string]any{ - "query": q, - "config": cfg, - }) + + out, _, err := (*rule.Program).Eval(evalMap) if err != nil { return err } @@ -347,11 +440,10 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } if tripped { // TODO: Get line numbers in the output - msg := c.Msgs[name] - if msg == "" { - fmt.Fprintf(c.Stderr, "%s: %s: %s\n", query.Filename, q.Name, name) + if rule.Message == "" { + fmt.Fprintf(c.Stderr, "%s: %s: %s\n", query.Filename, query.Name, name) } else { - fmt.Fprintf(c.Stderr, "%s: %s: %s: %s\n", query.Filename, q.Name, name, msg) + fmt.Fprintf(c.Stderr, "%s: %s: %s: %s\n", query.Filename, query.Name, name, rule.Message) } errored = true } @@ -386,3 +478,8 @@ func vetQuery(q *plugin.Query) *plugin.VetQuery { Params: params, } } + +type vetEngineOutput struct { + PostgreSQL *plugin.PostgreSQL + MySQL *plugin.MySQL +} diff --git a/internal/opts/debug.go b/internal/opts/debug.go index 2c6f9bcaae..9fbb0a9742 100644 --- a/internal/opts/debug.go +++ b/internal/opts/debug.go @@ -11,12 +11,16 @@ import ( // dumpast: setting dumpast=1 will print the AST of every SQL statement // dumpcatalog: setting dumpcatalog=1 will print the parsed database schema // trace: setting trace= will output a trace +// processplugins: setting processplugins=0 will disable process-based plugins +// dumpexplain: setting dumpexplain=1 will print the JSON-formatted output +// from executing EXPLAIN ... on a query during vet rule evaluation type Debug struct { DumpAST bool DumpCatalog bool Trace string ProcessPlugins bool + DumpExplain bool } func DebugFromEnv() Debug { @@ -46,6 +50,8 @@ func DebugFromString(val string) Debug { } case pair == "processplugins=0": d.ProcessPlugins = false + case pair == "dumpexplain=1": + d.DumpExplain = true } } return d diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index 12003c9ba8..c0544e4ed6 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -1782,6 +1782,960 @@ func (x *VetQuery) GetParams() []*VetParameter { 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{ @@ -2073,16 +3027,235 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 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, 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, + 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, } var ( @@ -2097,37 +3270,51 @@ func file_plugin_codegen_proto_rawDescGZIP() []byte { return file_plugin_codegen_proto_rawDescData } -var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 37) 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 - nil, // 21: plugin.ParsedGoType.StructTagsEntry - nil, // 22: plugin.Settings.RenameEntry + (*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 } 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 - 21, // 2: plugin.ParsedGoType.struct_tags:type_name -> plugin.ParsedGoType.StructTagsEntry - 22, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry + 25, // 2: plugin.ParsedGoType.struct_tags:type_name -> plugin.ParsedGoType.StructTagsEntry + 26, // 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 @@ -2150,11 +3337,27 @@ var file_plugin_codegen_proto_depIdxs = []int32{ 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 - 26, // [26:26] is the sub-list for method output_type - 26, // [26:26] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 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 } func init() { file_plugin_codegen_proto_init() } @@ -2415,6 +3618,126 @@ func file_plugin_codegen_proto_init() { 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{} @@ -2423,7 +3746,7 @@ func file_plugin_codegen_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, - NumMessages: 23, + NumMessages: 37, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go index d4f35041f2..3fe441dfbb 100644 --- a/internal/plugin/codegen_vtproto.pb.go +++ b/internal/plugin/codegen_vtproto.pb.go @@ -5,10 +5,12 @@ 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" ) @@ -613,6 +615,312 @@ 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 @@ -1514,709 +1822,639 @@ func (this *VetQuery) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } -func (m *File) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil +func (this *PostgreSQL) EqualVT(that *PostgreSQL) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if !this.Explain.EqualVT(that.Explain) { + return false } - return dAtA[:n], nil + 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 *PostgreSQL) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQL) + if !ok { + return false + } + return this.EqualVT(that) } - -func (m *File) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *PostgreSQLExplain_Plan) EqualVT(that *PostgreSQLExplain_Plan) bool { + if this == that { + return true + } else if this == nil || that == nil { + 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.NodeType != that.NodeType { + 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 + if this.ParentRelationship != that.ParentRelationship { + 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 + if this.RelationName != that.RelationName { + return false } - return len(dAtA) - i, nil -} - -func (m *Override) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if this.Schema != that.Schema { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if this.Alias != that.Alias { + return false } - return dAtA[:n], nil -} - -func (m *Override) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Override) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if this.ParallelAware != that.ParallelAware { + 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.AsyncCapable != that.AsyncCapable { + return false } - if m.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 + if this.StartupCost != that.StartupCost { + return false } - if m.GoType != nil { - size, err := m.GoType.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + 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 } - 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 len(this.Plans) != len(that.Plans) { + return false } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + 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 + } } - 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 this.SharedHitBlocks != that.SharedHitBlocks { + return false } - if m.Nullable { - i-- - if m.Nullable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + 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 } - 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 this.JoinType != that.JoinType { + 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.InnerUnique != that.InnerUnique { + return false } - return len(dAtA) - i, nil -} - -func (m *ParsedGoType) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if this.HashCond != that.HashCond { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if this.IndexName != that.IndexName { + return false } - return dAtA[:n], nil + if this.ScanDirection != that.ScanDirection { + return false + } + if this.IndexCond != that.IndexCond { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -func (m *ParsedGoType) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +func (this *PostgreSQLExplain_Plan) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQLExplain_Plan) + if !ok { + return false + } + return this.EqualVT(that) } - -func (m *ParsedGoType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *PostgreSQLExplain_Planning) EqualVT(that *PostgreSQLExplain_Planning) bool { + if this == that { + return true + } else if this == nil || that == nil { + 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.SharedHitBlocks != that.SharedHitBlocks { + 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.SharedReadBlocks != that.SharedReadBlocks { + return false } - if m.BasicType { - i-- - if m.BasicType { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 + if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { + 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.SharedWrittenBlocks != that.SharedWrittenBlocks { + 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.LocalHitBlocks != that.LocalHitBlocks { + 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.LocalReadBlocks != that.LocalReadBlocks { + return false } - return len(dAtA) - i, nil -} - -func (m *Settings) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if this.LocalWrittenBlocks != that.LocalWrittenBlocks { + return false } - return dAtA[:n], nil + if this.TempReadBlocks != that.TempReadBlocks { + return false + } + if this.TempWrittenBlocks != that.TempWrittenBlocks { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -func (m *Settings) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +func (this *PostgreSQLExplain_Planning) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQLExplain_Planning) + if !ok { + return false + } + return this.EqualVT(that) } - -func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *PostgreSQLExplain) EqualVT(that *PostgreSQLExplain) bool { + if this == that { + return true + } else if this == nil || that == nil { + 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.Plan.EqualVT(that.Plan) { + return false } - if m.Codegen != nil { - size, err := m.Codegen.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + 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 } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - 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)) - i-- - dAtA[i] = 0x5a + if !this.Planning.EqualVT(that.Planning) { + 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 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PostgreSQLExplain) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PostgreSQLExplain) + if !ok { + 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 - } + 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 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.Explain.EqualVT(that.Explain) { + 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MySQL) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQL) + if !ok { + 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 + 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 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.Table.EqualVT(that.Table) { + 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 + if !this.OrderingOperation.EqualVT(that.OrderingOperation) { + return false } - return len(dAtA) - i, nil -} - -func (m *Codegen) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if len(this.NestedLoop) != len(that.NestedLoop) { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + 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 dAtA[:n], nil + return string(this.unknownFields) == string(that.unknownFields) } -func (m *Codegen) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +func (this *MySQLExplain_QueryBlock) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MySQLExplain_QueryBlock) + if !ok { + return false + } + return this.EqualVT(that) } - -func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *MySQLExplain_Table) EqualVT(that *MySQLExplain_Table) bool { + if this == that { + return true + } else if this == nil || that == nil { + 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.TableName != that.TableName { + 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 + if this.AccessType != that.AccessType { + 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.RowsExaminedPerScan != that.RowsExaminedPerScan { + 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 + if this.RowsProducedPerJoin != that.RowsProducedPerJoin { + return false } - return len(dAtA) - i, nil -} - -func (m *GoCode) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if this.Filtered != that.Filtered { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if len(this.CostInfo) != len(that.CostInfo) { + return false } - return dAtA[:n], nil -} - -func (m *GoCode) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + for i, vx := range this.CostInfo { + vy, ok := that.CostInfo[i] + if !ok { + return false + } + if vx != vy { + 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.UsedColumns) != len(that.UsedColumns) { + return false } - if m.OmitUnusedStructs { - i-- - if m.OmitUnusedStructs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + for i, vx := range this.UsedColumns { + vy := that.UsedColumns[i] + if vx != vy { + return false } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 } - if m.JsonTagsIdUppercase { - i-- - if m.JsonTagsIdUppercase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + 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 } - 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 this.Key != that.Key { + return false } - 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 len(this.UsedKeyParts) != len(that.UsedKeyParts) { + return false } - if m.QueryParameterLimit != nil { - i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) + 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] = 0x1 + 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] = 0xb8 + dAtA[i] = 0xa } - if m.EmitPointersForNullTypes { + return len(dAtA) - i, nil +} + +func (m *Override) 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 *Override) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Override) 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.Unsigned { i-- - if m.EmitPointersForNullTypes { + if m.Unsigned { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 + dAtA[i] = 0x58 } - 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.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 m.EmitAllEnumValues { + if len(m.ColumnName) > 0 { + i -= len(m.ColumnName) + copy(dAtA[i:], m.ColumnName) + i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) i-- - if m.EmitAllEnumValues { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0x42 + } + 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] = 0x1 + 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] = 0xa0 + dAtA[i] = 0x32 } - if m.EmitEnumValidMethod { + if m.Nullable { i-- - if m.EmitEnumValidMethod { + if m.Nullable { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 + dAtA[i] = 0x28 } - 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 + 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] = 0x92 + dAtA[i] = 0x1a } - if len(m.OutputQuerierFileName) > 0 { - i -= len(m.OutputQuerierFileName) - copy(dAtA[i:], m.OutputQuerierFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) + 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] = 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 - } - if m.EmitEmptySlices { - i-- - if m.EmitEmptySlices { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.EmitExactTableNames { - i-- - if m.EmitExactTableNames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.EmitPreparedQueries { - i-- - 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 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { +func (m *ParsedGoType) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2229,12 +2467,12 @@ func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JSONCode) MarshalToVT(dAtA []byte) (int, error) { +func (m *ParsedGoType) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ParsedGoType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2246,31 +2484,60 @@ 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))) + 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 + } + 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.Indent) > 0 { - i -= len(m.Indent) - copy(dAtA[i:], m.Indent) - i = encodeVarint(dAtA, i, uint64(len(m.Indent))) + 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.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + 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 *Catalog) MarshalVT() (dAtA []byte, err error) { +func (m *Settings) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2283,12 +2550,12 @@ func (m *Catalog) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Catalog) MarshalToVT(dAtA []byte) (int, error) { +func (m *Settings) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2300,126 +2567,103 @@ func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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 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 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 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 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] = 0x22 + dAtA[i] = 0x32 } } - 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)) + 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.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)) + 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.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)) + 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.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + 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.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + 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 *CompositeType) MarshalVT() (dAtA []byte, err error) { +func (m *Codegen) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2432,12 +2676,12 @@ func (m *CompositeType) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CompositeType) MarshalToVT(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2449,24 +2693,31 @@ func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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.Options) > 0 { + i -= len(m.Options) + copy(dAtA[i:], m.Options) + i = encodeVarint(dAtA, i, uint64(len(m.Options))) + 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))) 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))) + 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 *Enum) MarshalVT() (dAtA []byte, err error) { +func (m *GoCode) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2479,12 +2730,12 @@ func (m *Enum) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Enum) MarshalToVT(dAtA []byte) (int, error) { +func (m *GoCode) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2496,95 +2747,268 @@ func (m *Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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 m.OmitUnusedStructs { i-- - dAtA[i] = 0x1a - } - 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.OmitUnusedStructs { + 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] = 0xa + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 } - return len(dAtA) - i, nil -} - -func (m *Table) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.JsonTagsIdUppercase { + i-- + if m.JsonTagsIdUppercase { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + 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 } - return dAtA[:n], nil -} - -func (m *Table) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + 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 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.QueryParameterLimit != nil { + i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + if m.EmitPointersForNullTypes { i-- - dAtA[i] = 0x1a + if m.EmitPointersForNullTypes { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 } - if len(m.Columns) > 0 { - for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + 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] = 0x12 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa } } - if m.Rel != nil { - size, err := m.Rel.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if m.EmitAllEnumValues { + i-- + if m.EmitAllEnumValues { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + 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 + } + if m.EmitEmptySlices { + i-- + if m.EmitEmptySlices { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.EmitExactTableNames { + i-- + if m.EmitExactTableNames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.EmitPreparedQueries { + i-- + 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 *Identifier) MarshalVT() (dAtA []byte, err error) { +func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2597,12 +3021,12 @@ func (m *Identifier) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Identifier) MarshalToVT(dAtA []byte) (int, error) { +func (m *JSONCode) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Identifier) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2614,31 +3038,31 @@ func (m *Identifier) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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))) + 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.Schema) > 0 { - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + 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.Catalog) > 0 { - i -= len(m.Catalog) - copy(dAtA[i:], m.Catalog) - i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) + 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 *Column) MarshalVT() (dAtA []byte, err error) { +func (m *Catalog) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2651,12 +3075,12 @@ func (m *Column) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Column) MarshalToVT(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Column) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2668,142 +3092,43 @@ func (m *Column) MarshalToSizedBufferVT(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 + 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] = 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.MarshalToSizedBufferVT(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.MarshalToSizedBufferVT(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]) - 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 - } + 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] = 0x38 + dAtA[i] = 0x1a } - if m.Length != 0 { - i = encodeVarint(dAtA, i, uint64(m.Length)) + 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] = 0x30 + 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] = 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 *Query) MarshalVT() (dAtA []byte, err error) { +func (m *Schema) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2816,12 +3141,12 @@ func (m *Query) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Query) MarshalToVT(dAtA []byte) (int, error) { +func (m *Schema) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Schema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2833,35 +3158,9 @@ func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.InsertIntoTable != nil { - size, err := m.InsertIntoTable.MarshalToSizedBufferVT(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].MarshalToSizedBufferVT(dAtA[:i]) + 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 } @@ -2871,9 +3170,9 @@ func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.Columns) > 0 { - for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + 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 } @@ -2883,12 +3182,17 @@ func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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.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) @@ -2897,17 +3201,17 @@ func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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))) + 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 *Parameter) MarshalVT() (dAtA []byte, err error) { +func (m *CompositeType) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2920,12 +3224,12 @@ func (m *Parameter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Parameter) MarshalToVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Parameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2937,25 +3241,24 @@ func (m *Parameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Column != nil { - size, err := m.Column.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 m.Number != 0 { - i = encodeVarint(dAtA, i, uint64(m.Number)) + 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 *CodeGenRequest) MarshalVT() (dAtA []byte, err error) { +func (m *Enum) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2968,12 +3271,12 @@ func (m *CodeGenRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CodeGenRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *Enum) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CodeGenRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2985,56 +3288,33 @@ func (m *CodeGenRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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))) + 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.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Queries[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + 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] = 0x1a + dAtA[i] = 0x12 } } - if m.Catalog != nil { - size, err := m.Catalog.MarshalToSizedBufferVT(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.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] = 0xa } return len(dAtA) - i, nil } -func (m *CodeGenResponse) MarshalVT() (dAtA []byte, err error) { +func (m *Table) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3047,12 +3327,12 @@ func (m *CodeGenResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CodeGenResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *Table) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CodeGenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3064,22 +3344,39 @@ func (m *CodeGenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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].MarshalToSizedBufferVT(dAtA[:i]) + 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 len(m.Columns) > 0 { + for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if m.Rel != nil { + size, err := m.Rel.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 *VetParameter) MarshalVT() (dAtA []byte, err error) { +func (m *Identifier) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3092,12 +3389,12 @@ func (m *VetParameter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *VetParameter) MarshalToVT(dAtA []byte) (int, error) { +func (m *Identifier) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *VetParameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Identifier) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3109,15 +3406,31 @@ 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.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] = 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 *VetConfig) MarshalVT() (dAtA []byte, err error) { +func (m *Column) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3130,12 +3443,12 @@ func (m *VetConfig) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *VetConfig) MarshalToVT(dAtA []byte) (int, error) { +func (m *Column) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *VetConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Column) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3147,42 +3460,142 @@ 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] = 0x1 + i-- + dAtA[i] = 0x80 } - 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.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.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) + if m.IsSqlcSlice { i-- - dAtA[i] = 0x12 + if m.IsSqlcSlice { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + if m.Type != nil { + size, err := m.Type.MarshalToSizedBufferVT(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]) + 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 + } + 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 *VetQuery) MarshalVT() (dAtA []byte, err error) { +func (m *Query) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3195,12 +3608,12 @@ func (m *VetQuery) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *VetQuery) MarshalToVT(dAtA []byte) (int, error) { +func (m *Query) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *VetQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3212,20 +3625,58 @@ 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)) - i-- - dAtA[i] = 0x22 + if m.InsertIntoTable != nil { + size, err := m.InsertIntoTable.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 } - if len(m.Cmd) > 0 { - i -= len(m.Cmd) + 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].MarshalToSizedBufferVT(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].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-- @@ -3238,46 +3689,35 @@ func (m *VetQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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.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 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) { +func (m *Parameter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *File) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Parameter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *File) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Parameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3289,42 +3729,43 @@ func (m *File) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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))) + if m.Column != nil { + size, err := m.Column.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) 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))) + 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 *Override) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CodeGenRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Override) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Override) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3336,96 +3777,74 @@ func (m *Override) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Unsigned { + if len(m.PluginOptions) > 0 { + i -= len(m.PluginOptions) + copy(dAtA[i:], m.PluginOptions) + i = encodeVarint(dAtA, i, uint64(len(m.PluginOptions))) i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x58 + dAtA[i] = 0x22 } - if m.GoType != nil { - size, err := m.GoType.MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Queries) > 0 { + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Queries[iNdEx].MarshalToSizedBufferVT(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.MarshalToSizedBufferVT(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 + dAtA[i] = 0x12 } - if m.Table != nil { - size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Settings != nil { + size, err := m.Settings.MarshalToSizedBufferVT(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 *ParsedGoType) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CodeGenResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *ParsedGoType) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ParsedGoType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CodeGenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3437,78 +3856,40 @@ 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))) + if len(m.Files) > 0 { + for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Files[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) 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 } - 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.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.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 *Settings) MarshalVTStrict() (dAtA []byte, err error) { +func (m *VetParameter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Settings) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *VetParameter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *VetParameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3520,66 +3901,43 @@ 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)) + if m.Number != 0 { + i = encodeVarint(dAtA, i, uint64(m.Number)) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x8 } - 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 + return len(dAtA) - i, nil +} + +func (m *VetConfig) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - 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 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - 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 - } + return dAtA[:n], nil +} + +func (m *VetConfig) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VetConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - 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 - } + 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-- { @@ -3616,25 +3974,25 @@ func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { +func (m *VetQuery) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *VetQuery) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *VetQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3646,49 +4004,61 @@ func (m *Codegen) MarshalToSizedBufferVTStrict(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.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.Plugin) > 0 { - i -= len(m.Plugin) - copy(dAtA[i:], m.Plugin) - i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) + 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.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + 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 *GoCode) MarshalVTStrict() (dAtA []byte, err error) { +func (m *PostgreSQL) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *GoCode) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *PostgreSQL) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *PostgreSQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3700,58 +4070,88 @@ func (m *GoCode) MarshalToSizedBufferVTStrict(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 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] = 0x1 - i-- - dAtA[i] = 0xd8 + dAtA[i] = 0xa } - if m.JsonTagsIdUppercase { - i-- - if m.JsonTagsIdUppercase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0xd0 + dAtA[i] = 0xf2 } - if len(m.SqlDriver) > 0 { - i -= len(m.SqlDriver) - copy(dAtA[i:], m.SqlDriver) - i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) + 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] = 0xca + dAtA[i] = 0xea } - if len(m.OutputBatchFileName) > 0 { - i -= len(m.OutputBatchFileName) - copy(dAtA[i:], m.OutputBatchFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) + 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] = 0xc2 + dAtA[i] = 0xe2 } - if m.QueryParameterLimit != nil { - i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) + 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] = 0xb8 + dAtA[i] = 0xda } - if m.EmitPointersForNullTypes { + if m.InnerUnique { i-- - if m.EmitPointersForNullTypes { + if m.InnerUnique { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -3759,227 +4159,297 @@ func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xb0 + dAtA[i] = 0xd0 } - 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]))) + 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] = 0xaa + dAtA[i] = 0xc2 } } - if m.EmitAllEnumValues { + if m.TempWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) i-- - if m.EmitAllEnumValues { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0xa0 + dAtA[i] = 0xb0 } - if m.EmitEnumValidMethod { + if m.LocalWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) i-- - if m.EmitEnumValidMethod { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x98 + dAtA[i] = 0xa0 } - if len(m.OutputFilesSuffix) > 0 { - i -= len(m.OutputFilesSuffix) - copy(dAtA[i:], m.OutputFilesSuffix) - i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) + if m.LocalReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x92 + dAtA[i] = 0x98 } - if len(m.OutputQuerierFileName) > 0 { - i -= len(m.OutputQuerierFileName) - copy(dAtA[i:], m.OutputQuerierFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) + if m.LocalHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x8a + dAtA[i] = 0x90 } - if len(m.OutputModelsFileName) > 0 { - i -= len(m.OutputModelsFileName) - copy(dAtA[i:], m.OutputModelsFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) + if m.SharedWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x82 + dAtA[i] = 0x88 } - if len(m.OutputDbFileName) > 0 { - i -= len(m.OutputDbFileName) - copy(dAtA[i:], m.OutputDbFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) + if m.SharedDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) i-- - dAtA[i] = 0x7a + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 } - if len(m.SqlPackage) > 0 { - i -= len(m.SqlPackage) - copy(dAtA[i:], m.SqlPackage) - i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) + if m.SharedReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x78 } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + if m.SharedHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x70 } - 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.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] = 0x62 + dAtA[i] = 0x58 } - if len(m.JsonTagsCaseStyle) > 0 { - i -= len(m.JsonTagsCaseStyle) - copy(dAtA[i:], m.JsonTagsCaseStyle) - i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) + if m.PlanRows != 0 { + i = encodeVarint(dAtA, i, uint64(m.PlanRows)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x50 } - if m.EmitMethodsWithDbArgument { + if m.TotalCost != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) i-- - if m.EmitMethodsWithDbArgument { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x4d + } + if m.StartupCost != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x45 } - if m.EmitParamsStructPointers { + if m.AsyncCapable { i-- - if m.EmitParamsStructPointers { + if m.AsyncCapable { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x48 + dAtA[i] = 0x38 } - if m.EmitResultStructPointers { + if m.ParallelAware { i-- - if m.EmitResultStructPointers { + if m.ParallelAware { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 + dAtA[i] = 0x30 } - if m.EmitExportedQueries { + if len(m.Alias) > 0 { + i -= len(m.Alias) + copy(dAtA[i:], m.Alias) + i = encodeVarint(dAtA, i, uint64(len(m.Alias))) i-- - if m.EmitExportedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x38 + dAtA[i] = 0x22 } - if m.EmitEmptySlices { + if len(m.RelationName) > 0 { + i -= len(m.RelationName) + copy(dAtA[i:], m.RelationName) + i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) i-- - if m.EmitEmptySlices { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x30 + dAtA[i] = 0x12 } - if m.EmitExactTableNames { + if len(m.NodeType) > 0 { + i -= len(m.NodeType) + copy(dAtA[i:], m.NodeType) + i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) i-- - if m.EmitExactTableNames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x28 + dAtA[i] = 0x50 } - if m.EmitPreparedQueries { + if m.TempReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) i-- - if m.EmitPreparedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x48 + } + if m.LocalWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x40 } - if m.EmitDbTags { + if m.LocalDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) i-- - if m.EmitDbTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x38 + } + if m.LocalReadBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x30 } - if m.EmitJsonTags { + if m.LocalHitBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) i-- - if m.EmitJsonTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x28 + } + if m.SharedWrittenBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x20 } - if m.EmitInterface { + if m.SharedDirtiedBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) i-- - if m.EmitInterface { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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 *JSONCode) MarshalVTStrict() (dAtA []byte, err error) { +func (m *PostgreSQLExplain) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *JSONCode) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *PostgreSQLExplain) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *JSONCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *PostgreSQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3991,49 +4461,67 @@ func (m *JSONCode) MarshalToSizedBufferVTStrict(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))) + 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.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.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 len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + 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 *Catalog) MarshalVTStrict() (dAtA []byte, err error) { +func (m *MySQL) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MySQL) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MySQL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4045,61 +4533,38 @@ func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - } - 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 -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { +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.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_QueryBlock) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_QueryBlock) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4111,78 +4576,91 @@ func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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].MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 0x2a + dAtA[i] = 0x32 } } - 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 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 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)) + 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.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + 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 len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + if m.SelectId != 0 { + i = encodeVarint(dAtA, i, uint64(m.SelectId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *CompositeType) MarshalVTStrict() (dAtA []byte, err error) { +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.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *CompositeType) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_Table) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4194,42 +4672,138 @@ func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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.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.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + 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 *Enum) MarshalVTStrict() (dAtA []byte, err error) { +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.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_NestedLoopObj) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_NestedLoopObj) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4241,51 +4815,38 @@ func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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))) - i-- - dAtA[i] = 0x1a - } - 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.Table != nil { + size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Table) MarshalVTStrict() (dAtA []byte, err error) { +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.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Table) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_OrderingOperation) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Table) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain_OrderingOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4297,57 +4858,79 @@ func (m *Table) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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))) - i-- - dAtA[i] = 0x1a - } - if len(m.Columns) > 0 { - for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 0x12 + dAtA[i] = 0x22 } } - if m.Rel != nil { - size, err := m.Rel.MarshalToSizedBufferVTStrict(dAtA[:i]) + 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 + 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 *Identifier) MarshalVTStrict() (dAtA []byte, err error) { +func (m *MySQLExplain) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Identifier) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Identifier) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MySQLExplain) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4359,31 +4942,31 @@ func (m *Identifier) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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))) + 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 (m *Column) MarshalVTStrict() (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 } @@ -4396,12 +4979,12 @@ func (m *Column) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Column) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *File) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Column) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *File) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4413,61 +4996,79 @@ func (m *Column) 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] = 0x1 + 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] = 0x80 + dAtA[i] = 0x12 } - if len(m.OriginalName) > 0 { - i -= len(m.OriginalName) - copy(dAtA[i:], m.OriginalName) - i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) + 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] = 0x7a + dAtA[i] = 0xa } - 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 + return len(dAtA) - i, nil +} + +func (m *Override) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.IsSqlcSlice { + 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 *Override) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Override) 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.IsSqlcSlice { + if m.Unsigned { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x68 + dAtA[i] = 0x58 } - if m.Type != nil { - size, err := m.Type.MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 0x62 + dAtA[i] = 0x52 } - if len(m.TableAlias) > 0 { - i -= len(m.TableAlias) - copy(dAtA[i:], m.TableAlias) - i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) + 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] = 0x5a + dAtA[i] = 0x42 } if m.Table != nil { size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) @@ -4477,78 +5078,43 @@ func (m *Column) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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 + dAtA[i] = 0x3a } - 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.Column) > 0 { + i -= len(m.Column) + copy(dAtA[i:], m.Column) + i = encodeVarint(dAtA, i, uint64(len(m.Column))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } - if m.IsArray { + if m.Nullable { i-- - if m.IsArray { + if m.Nullable { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } - if m.NotNull { - i-- - if m.NotNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x18 + 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.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 *Query) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ParsedGoType) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4561,12 +5127,12 @@ func (m *Query) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Query) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ParsedGoType) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Query) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ParsedGoType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4578,81 +5144,60 @@ func (m *Query) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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]))) + 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] = 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)) + 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.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 m.BasicType { + i-- + if m.BasicType { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x20 } - if len(m.Cmd) > 0 { - i -= len(m.Cmd) - copy(dAtA[i:], m.Cmd) - i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) + 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.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarint(dAtA, i, uint64(len(m.Text))) + 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 *Parameter) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Settings) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4665,12 +5210,12 @@ func (m *Parameter) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Parameter) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Settings) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4682,215 +5227,66 @@ func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Column != nil { - size, err := m.Column.MarshalToSizedBufferVTStrict(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] = 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 - } + dAtA[i] = 0x62 } - if m.Catalog != nil { - size, err := m.Catalog.MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 0x12 + dAtA[i] = 0x5a } - if m.Settings != nil { - size, err := m.Settings.MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 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) + dAtA[i] = 0x52 } - if len(m.Files) > 0 { - for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Files[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 0xa + dAtA[i] = 0x32 } } - 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.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-- { @@ -4927,7 +5323,7 @@ func (m *VetConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *VetQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4940,12 +5336,12 @@ func (m *VetQuery) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *VetQuery) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *VetQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4957,743 +5353,6033 @@ func (m *VetQuery) MarshalToSizedBufferVTStrict(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].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))) + 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 } - 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.Plugin) > 0 { + i -= len(m.Plugin) + copy(dAtA[i:], m.Plugin) + i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) 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.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 *File) SizeVT() (n int) { +func (m *GoCode) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return nil, nil } - l = len(m.Contents) - 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 } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -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 *GoCode) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *ParsedGoType) SizeVT() (n int) { +func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i 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.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.BasicType { - n += 2 + if m.OmitUnusedStructs { + i-- + if m.OmitUnusedStructs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 } - 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)) + if m.JsonTagsIdUppercase { + i-- + if m.JsonTagsIdUppercase { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 } - n += len(m.unknownFields) - return n -} - -func (m *Settings) SizeVT() (n int) { - if m == nil { - return 0 + 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 } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sov(uint64(l)) + 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 } - l = len(m.Engine) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.QueryParameterLimit != nil { + i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 } - if len(m.Schema) > 0 { - for _, s := range m.Schema { - l = len(s) - n += 1 + l + sov(uint64(l)) + if m.EmitPointersForNullTypes { + i-- + if m.EmitPointersForNullTypes { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 } - if len(m.Queries) > 0 { - for _, s := range m.Queries { - l = len(s) - n += 1 + l + sov(uint64(l)) + 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 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 m.EmitAllEnumValues { + i-- + if m.EmitAllEnumValues { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 } - if len(m.Overrides) > 0 { - for _, e := range m.Overrides { - l = e.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.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 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 m.Codegen != nil { - l = m.Codegen.SizeVT() - n += 1 + l + sov(uint64(l)) + 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 } - n += len(m.unknownFields) - return n -} - -func (m *Codegen) SizeVT() (n int) { - if m == nil { - return 0 + 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 } - var l int - _ = l - l = len(m.Out) - 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.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 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 m.EmitExportedQueries { - 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] = 0x6a } - if m.EmitResultStructPointers { - 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.EmitParamsStructPointers { - 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.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)) + i-- + if m.EmitMethodsWithDbArgument { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 } - if m.EmitEnumValidMethod { - n += 3 + if m.EmitParamsStructPointers { + i-- + if m.EmitParamsStructPointers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 } - if m.EmitAllEnumValues { - n += 3 + if m.EmitResultStructPointers { + i-- + if m.EmitResultStructPointers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 } - if len(m.InflectionExcludeTableNames) > 0 { - for _, s := range m.InflectionExcludeTableNames { - l = len(s) - n += 2 + l + sov(uint64(l)) + if m.EmitExportedQueries { + i-- + if m.EmitExportedQueries { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x38 } - if m.EmitPointersForNullTypes { - n += 3 + if m.EmitEmptySlices { + i-- + if m.EmitEmptySlices { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } - if m.QueryParameterLimit != nil { - n += 2 + sov(uint64(*m.QueryParameterLimit)) + if m.EmitExactTableNames { + i-- + if m.EmitExactTableNames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - l = len(m.OutputBatchFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) + if m.EmitPreparedQueries { + i-- + if m.EmitPreparedQueries { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 } - l = len(m.SqlDriver) - if l > 0 { - n += 2 + l + sov(uint64(l)) + if m.EmitDbTags { + i-- + if m.EmitDbTags { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if m.JsonTagsIdUppercase { - n += 3 + if m.EmitJsonTags { + i-- + if m.EmitJsonTags { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if m.OmitUnusedStructs { - n += 3 + if m.EmitInterface { + i-- + if m.EmitInterface { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *JSONCode) SizeVT() (n int) { +func (m *JSONCode) MarshalVTStrict() (dAtA []byte, err error) { 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)) + return nil, nil } - l = len(m.Filename) - 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 } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Catalog) SizeVT() (n int) { +func (m *JSONCode) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *JSONCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i 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)) + 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.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.Schemas) > 0 { - for _, e := range m.Schemas { - l = e.SizeVT() - 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 } - n += len(m.unknownFields) - return n + 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 *Schema) SizeVT() (n int) { +func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + 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 *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 } + i := len(dAtA) + _ = i 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 m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Tables) > 0 { - for _, e := range m.Tables { - l = e.SizeVT() - 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 } } - if len(m.Enums) > 0 { - for _, e := range m.Enums { - 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] = 0x1a } - if len(m.CompositeTypes) > 0 { - for _, e := range m.CompositeTypes { - 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 } - n += len(m.unknownFields) - return n + 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) SizeVT() (n int) { +func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return nil, nil } - l = len(m.Comment) - 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 } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Enum) SizeVT() (n int) { +func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Vals) > 0 { - for _, s := range m.Vals { - l = len(s) - 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 } } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) + 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 + } } - n += len(m.unknownFields) - return n + 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.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 *Table) SizeVT() (n int) { +func (m *CompositeType) MarshalVTStrict() (dAtA []byte, err error) { 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)) - } + return nil, nil } - l = len(m.Comment) - 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 } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Identifier) SizeVT() (n int) { +func (m *CompositeType) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i 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)) + 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] = 0x12 } - n += len(m.unknownFields) - return n + 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 *Column) SizeVT() (n int) { +func (m *Enum) MarshalVTStrict() (dAtA []byte, err error) { 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)) + return nil, nil } - if m.Unsigned { - n += 3 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Query) SizeVT() (n int) { +func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i 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 m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Params) > 0 { - for _, e := range m.Params { - 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] = 0x1a } - if len(m.Comments) > 0 { - for _, s := range m.Comments { - l = len(s) - n += 1 + l + sov(uint64(l)) + 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 } } - 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)) + 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 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *Parameter) SizeVT() (n int) { +func (m *Table) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Number != 0 { - n += 1 + sov(uint64(m.Number)) + return nil, nil } - if m.Column != nil { - l = m.Column.SizeVT() - 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 } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *CodeGenRequest) SizeVT() (n int) { +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 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Settings != nil { - l = m.Settings.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Catalog != nil { - l = m.Catalog.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] = 0x1a } - if len(m.Queries) > 0 { - for _, e := range m.Queries { - l = e.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.SqlcVersion) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.PluginOptions) - 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 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *CodeGenResponse) SizeVT() (n int) { +func (m *Identifier) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if len(m.Files) > 0 { - for _, e := range m.Files { - l = e.SizeVT() - 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 } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *VetParameter) SizeVT() (n int) { +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 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Number != 0 { - n += 1 + sov(uint64(m.Number)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + 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 *VetConfig) SizeVT() (n int) { +func (m *Column) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + 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 - l = len(m.Version) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Engine) - if l > 0 { - n += 1 + l + sov(uint64(l)) + 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.Schema) > 0 { - for _, s := range m.Schema { - l = len(s) - n += 1 + l + sov(uint64(l)) + 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 len(m.Queries) > 0 { - for _, s := range m.Queries { - l = len(s) - n += 1 + l + sov(uint64(l)) + 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 + } + 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 *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 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 } } - 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)) - } + if iNdEx > l { + return io.ErrUnexpectedEOF } - 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)))) + return nil } -func (m *File) UnmarshalVT(dAtA []byte) error { +func (m *Enum) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5716,10 +11402,10 @@ func (m *File) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: File: wiretype end group for non-group") + return fmt.Errorf("proto: Enum: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5756,9 +11442,9 @@ func (m *File) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vals", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5768,26 +11454,209 @@ func (m *File) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.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:]) @@ -5810,7 +11679,7 @@ func (m *File) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Override) UnmarshalVT(dAtA []byte) error { +func (m *Identifier) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5833,15 +11702,15 @@ func (m *Override) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Override: wiretype end group for non-group") + return fmt.Errorf("proto: Identifier: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Override: 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 CodeType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5869,11 +11738,11 @@ func (m *Override) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CodeType = string(dAtA[iNdEx:postIndex]) + m.Catalog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DbType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5901,31 +11770,11 @@ func (m *Override) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DbType = string(dAtA[iNdEx:postIndex]) + m.Schema = 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: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5953,47 +11802,62 @@ func (m *Override) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Column = string(dAtA[iNdEx:postIndex]) + m.Name = 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 + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Table == nil { - m.Table = &Identifier{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Column) 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 err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 8: + 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: 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 ColumnName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6021,13 +11885,13 @@ func (m *Override) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ColumnName = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoType", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotNull", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6037,31 +11901,15 @@ func (m *Override) 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.GoType == nil { - m.GoType = &ParsedGoType{} - } - if err := m.GoType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: + m.NotNull = bool(v != 0) + 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 IsArray", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -6078,61 +11926,10 @@ func (m *Override) UnmarshalVT(dAtA []byte) error { 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: + m.IsArray = bool(v != 0) + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportPath", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6160,13 +11957,52 @@ func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ImportPath = string(dAtA[iNdEx:postIndex]) + m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + 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 + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNamedParam", 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.IsNamedParam = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFuncCall", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6176,27 +12012,15 @@ func (m *ParsedGoType) 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.Package = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + m.IsFuncCall = bool(v != 0) + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6224,31 +12048,11 @@ func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TypeName = string(dAtA[iNdEx:postIndex]) + m.Scope = 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: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructTags", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6275,158 +12079,16 @@ func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { 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 - } + if m.Table == nil { + m.Table = &Identifier{} } - m.StructTags[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); 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: + iNdEx = postIndex + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TableAlias", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6454,13 +12116,13 @@ func (m *Settings) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.TableAlias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6470,29 +12132,53 @@ func (m *Settings) 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.Engine = string(dAtA[iNdEx:postIndex]) + if m.Type == nil { + m.Type = &Identifier{} + } + if err := m.Type.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + 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 Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EmbedTable", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6502,27 +12188,31 @@ func (m *Settings) 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.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) + if m.EmbedTable == nil { + m.EmbedTable = &Identifier{} + } + if err := m.EmbedTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6550,13 +12240,13 @@ func (m *Settings) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) + m.OriginalName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rename", wireType) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6566,124 +12256,68 @@ func (m *Settings) 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 + m.Unsigned = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Rename == nil { - m.Rename = make(map[string]string) + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - m.Rename[mapkey] = mapvalue - iNdEx = postIndex - case 6: + 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 Overrides", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6693,31 +12327,29 @@ func (m *Settings) 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.Overrides = append(m.Overrides, &Override{}) - if err := m.Overrides[len(m.Overrides)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Text = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Go", 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 @@ -6727,33 +12359,29 @@ func (m *Settings) 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.Go == nil { - m.Go = &GoCode{} - } - if err := m.Go.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6763,31 +12391,27 @@ func (m *Settings) 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.Json == nil { - m.Json = &JSONCode{} - } - if err := m.Json.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Cmd = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codegen", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6814,67 +12438,48 @@ func (m *Settings) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Codegen == nil { - m.Codegen = &Codegen{} - } - if err := m.Codegen.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Columns = append(m.Columns, &Column{}) + if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + case 5: + 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 (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Params = append(m.Params, &Parameter{}) + if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - 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: + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Comments", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6902,11 +12507,11 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Out = string(dAtA[iNdEx:postIndex]) + m.Comments = append(m.Comments, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6934,13 +12539,13 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Plugin = string(dAtA[iNdEx:postIndex]) + m.Filename = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InsertIntoTable", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6950,24 +12555,26 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen 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{} + if m.InsertIntoTable == nil { + m.InsertIntoTable = &Identifier{} + } + if err := m.InsertIntoTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -6992,7 +12599,7 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GoCode) UnmarshalVT(dAtA []byte) error { +func (m *Parameter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7015,17 +12622,17 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GoCode: wiretype end group for non-group") + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GoCode: 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 EmitInterface", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) } - var v int + m.Number = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7035,97 +12642,16 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Number |= int32(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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7135,97 +12661,84 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= 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) + if msglen < 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 + msglen + if postIndex < 0 { + return ErrInvalidLength } - m.EmitExportedQueries = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitResultStructPointers", wireType) + if postIndex > 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 - } + if m.Column == nil { + m.Column = &Column{} } - m.EmitResultStructPointers = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitParamsStructPointers", wireType) + if err := m.Column.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - 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 - } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.EmitParamsStructPointers = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitMethodsWithDbArgument", wireType) + if (skippy < 0) || (iNdEx+skippy) < 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 - } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.EmitMethodsWithDbArgument = bool(v != 0) - case 11: + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CodeGenRequest) 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: CodeGenRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CodeGenRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsCaseStyle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7235,29 +12748,33 @@ func (m *GoCode) 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.JsonTagsCaseStyle = string(dAtA[iNdEx:postIndex]) + if m.Settings == nil { + m.Settings = &Settings{} + } + if err := m.Settings.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 12: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7267,29 +12784,33 @@ func (m *GoCode) 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.Package = string(dAtA[iNdEx:postIndex]) + if m.Catalog == nil { + m.Catalog = &Catalog{} + } + if err := m.Catalog.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 13: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7299,27 +12820,29 @@ func (m *GoCode) 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.Out = string(dAtA[iNdEx:postIndex]) + 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 14: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlPackage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SqlcVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7347,13 +12870,13 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SqlPackage = string(dAtA[iNdEx:postIndex]) + m.SqlcVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 15: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputDbFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PluginOptions", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7363,29 +12886,82 @@ func (m *GoCode) 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.OutputDbFileName = string(dAtA[iNdEx:postIndex]) + m.PluginOptions = append(m.PluginOptions[:0], dAtA[iNdEx:postIndex]...) + if m.PluginOptions == nil { + m.PluginOptions = []byte{} + } iNdEx = postIndex - case 16: + 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: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputModelsFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7395,29 +12971,82 @@ func (m *GoCode) 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.OutputModelsFileName = string(dAtA[iNdEx:postIndex]) + m.Files = append(m.Files, &File{}) + if err := m.Files[len(m.Files)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputQuerierFileName", wireType) + 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 } - var stringLen uint64 + } + 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) + } + m.Number = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7427,27 +13056,65 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Number |= int32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.OutputQuerierFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: + 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 + } + 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: 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: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputFilesSuffix", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7475,51 +13142,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputFilesSuffix = string(dAtA[iNdEx:postIndex]) + m.Version = 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: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InflectionExcludeTableNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7547,51 +13174,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.InflectionExcludeTableNames = append(m.InflectionExcludeTableNames, string(dAtA[iNdEx:postIndex])) + m.Engine = 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: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputBatchFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7619,11 +13206,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputBatchFileName = string(dAtA[iNdEx:postIndex]) + m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 25: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlDriver", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7651,48 +13238,8 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SqlDriver = string(dAtA[iNdEx:postIndex]) + m.Queries = append(m.Queries, 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:]) @@ -7715,7 +13262,7 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *JSONCode) UnmarshalVT(dAtA []byte) error { +func (m *VetQuery) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7738,15 +13285,47 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JSONCode: wiretype end group for non-group") + return fmt.Errorf("proto: VetQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JSONCode: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VetQuery: 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) + 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 { @@ -7774,11 +13353,11 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Out = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Indent", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7806,13 +13385,13 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Indent = string(dAtA[iNdEx:postIndex]) + m.Cmd = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", 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 @@ -7822,23 +13401,25 @@ func (m *JSONCode) 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.Filename = string(dAtA[iNdEx:postIndex]) + 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 @@ -7862,7 +13443,7 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Catalog) UnmarshalVT(dAtA []byte) error { +func (m *PostgreSQL) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7885,17 +13466,17 @@ func (m *Catalog) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Catalog: wiretype end group for non-group") + return fmt.Errorf("proto: PostgreSQL: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Catalog: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Comment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7905,27 +13486,82 @@ func (m *Catalog) 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.Comment = string(dAtA[iNdEx:postIndex]) + if m.Explain == nil { + m.Explain = &PostgreSQLExplain{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + 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 DefaultSchema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7953,11 +13589,11 @@ func (m *Catalog) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DefaultSchema = string(dAtA[iNdEx:postIndex]) + m.NodeType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + 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 ParentRelationship", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7985,13 +13621,13 @@ func (m *Catalog) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.ParentRelationship = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schemas", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8001,80 +13637,27 @@ func (m *Catalog) 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.Schemas = append(m.Schemas, &Schema{}) - if err := m.Schemas[len(m.Schemas)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.RelationName = 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 *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: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8102,11 +13685,11 @@ func (m *Schema) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Comment = string(dAtA[iNdEx:postIndex]) + m.Schema = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8134,13 +13717,13 @@ func (m *Schema) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Alias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tables", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ParallelAware", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8150,31 +13733,97 @@ func (m *Schema) 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 + m.ParallelAware = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsyncCapable", wireType) } - postIndex := iNdEx + msglen - if postIndex < 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 + } } - if postIndex > l { + 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 } - m.Tables = append(m.Tables, &Table{}) - if err := m.Tables[len(m.Tables)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + 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) } - iNdEx = postIndex - case 4: + 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 Enums", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8184,29 +13833,27 @@ func (m *Schema) 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.Enums = append(m.Enums, &Enum{}) - if err := m.Enums[len(m.Enums)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Output = append(m.Output, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompositeTypes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Plans", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8233,67 +13880,16 @@ func (m *Schema) UnmarshalVT(dAtA []byte) error { 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 { + 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 - 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) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) } - var stringLen uint64 + m.SharedHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8303,29 +13899,35 @@ func (m *CompositeType) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SharedHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) } - if postIndex > 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) } - var stringLen uint64 + m.SharedDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8335,80 +13937,92 @@ func (m *CompositeType) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + 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 + } } - m.Comment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 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 + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) } - 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 + 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 iNdEx >= l { - return io.ErrUnexpectedEOF + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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) + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) } - var stringLen uint64 + m.LocalWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8418,29 +14032,35 @@ func (m *Enum) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.LocalWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + 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 + } } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vals", wireType) + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) } - var stringLen uint64 + m.TempWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8450,27 +14070,14 @@ func (m *Enum) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TempWrittenBlocks |= 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: + case 24: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SortKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8498,64 +14105,13 @@ func (m *Enum) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Comment = string(dAtA[iNdEx:postIndex]) + m.SortKey = append(m.SortKey, 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: + case 25: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JoinType", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8565,33 +14121,29 @@ func (m *Table) 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.Rel == nil { - m.Rel = &Identifier{} - } - if err := m.Rel.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.JoinType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InnerUnique", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8601,29 +14153,15 @@ func (m *Table) 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.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: + m.InnerUnique = bool(v != 0) + case 27: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HashCond", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8651,62 +14189,11 @@ func (m *Table) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Comment = string(dAtA[iNdEx:postIndex]) + m.HashCond = 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 *Identifier) 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: Identifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 28: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IndexName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8734,11 +14221,11 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Catalog = string(dAtA[iNdEx:postIndex]) + m.IndexName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 29: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ScanDirection", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8766,11 +14253,11 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Schema = string(dAtA[iNdEx:postIndex]) + m.ScanDirection = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 30: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IndexCond", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8798,7 +14285,7 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.IndexCond = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8822,7 +14309,7 @@ func (m *Identifier) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Column) UnmarshalVT(dAtA []byte) error { +func (m *PostgreSQLExplain_Planning) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8845,49 +14332,17 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Column: wiretype end group for non-group") + return fmt.Errorf("proto: PostgreSQLExplain_Planning: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Column: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PostgreSQLExplain_Planning: 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) + return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) } - var v int + m.SharedHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8897,17 +14352,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.SharedHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.NotNull = bool(v != 0) - case 4: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsArray", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) } - var v int + m.SharedReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8917,17 +14371,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.SharedReadBlocks |= uint64(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) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) } - var stringLen uint64 + m.SharedDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8937,29 +14390,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SharedDirtiedBlocks |= 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 6: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) } - m.Length = 0 + m.SharedWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8969,16 +14409,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Length |= int32(b&0x7F) << shift + m.SharedWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNamedParam", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) } - var v int + m.LocalHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8988,17 +14428,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.LocalHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsNamedParam = bool(v != 0) - case 8: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsFuncCall", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) } - var v int + m.LocalReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9008,17 +14447,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.LocalReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsFuncCall = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) } - var stringLen uint64 + m.LocalDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9028,29 +14466,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.LocalDirtiedBlocks |= 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.Scope = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) } - var msglen int + m.LocalWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9060,33 +14485,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.LocalWrittenBlocks |= uint64(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 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableAlias", wireType) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) } - var stringLen uint64 + m.TempReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9096,29 +14504,16 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TempReadBlocks |= 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.TableAlias = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) } - var msglen int + m.TempWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9128,51 +14523,65 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.TempWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Type == nil { - m.Type = &Identifier{} - } - if err := m.Type.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSqlcSlice", 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.IsSqlcSlice = bool(v != 0) - case 14: + } + 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 EmbedTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9199,18 +14608,18 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.EmbedTable == nil { - m.EmbedTable = &Identifier{} + if m.Plan == nil { + m.Plan = &PostgreSQLExplain_Plan{} } - if err := m.EmbedTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Plan.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 15: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9220,29 +14629,124 @@ func (m *Column) 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.OriginalName = string(dAtA[iNdEx:postIndex]) + 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 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Planning", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9252,12 +14756,28 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Unsigned = bool(v != 0) + 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:]) @@ -9280,7 +14800,7 @@ func (m *Column) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Query) UnmarshalVT(dAtA []byte) error { +func (m *MySQL) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9303,17 +14823,17 @@ 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: MySQL: 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: 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 Text", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9323,29 +14843,84 @@ 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.Text = string(dAtA[iNdEx:postIndex]) + if m.Explain == nil { + m.Explain = &MySQLExplain{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - var stringLen uint64 + 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 @@ -9355,27 +14930,14 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SelectId |= 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: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9403,11 +14965,11 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Cmd = string(dAtA[iNdEx:postIndex]) + m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9434,14 +14996,107 @@ 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 { - return err + 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 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9468,48 +15123,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 { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comments", 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.Table == nil { + m.Table = &MySQLExplain_Table{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Comments = append(m.Comments, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 7: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OrderingOperation", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9519,27 +15144,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.Filename = string(dAtA[iNdEx:postIndex]) + if m.OrderingOperation == nil { + m.OrderingOperation = &MySQLExplain_OrderingOperation{} + } + if err := m.OrderingOperation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 8: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsertIntoTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9566,10 +15195,8 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.InsertIntoTable == nil { - m.InsertIntoTable = &Identifier{} - } - if err := m.InsertIntoTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + 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 @@ -9595,7 +15222,7 @@ func (m *Query) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Parameter) UnmarshalVT(dAtA []byte) error { +func (m *MySQLExplain_Table) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9618,17 +15245,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: MySQLExplain_Table: 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: MySQLExplain_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 Number", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) } - m.Number = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9638,16 +15265,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.TableName = 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 AccessType", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9657,84 +15297,29 @@ 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{} - } - if err := m.Column.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.AccessType = 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 *CodeGenRequest) 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: CodeGenRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CodeGenRequest: 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) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RowsExaminedPerScan", wireType) } - var msglen int + m.RowsExaminedPerScan = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9744,33 +15329,35 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.RowsExaminedPerScan |= uint64(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{} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RowsProducedPerJoin", wireType) } - if err := m.Settings.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 + } } - iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filtered", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9780,31 +15367,27 @@ func (m *CodeGenRequest) 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.Catalog == nil { - m.Catalog = &Catalog{} - } - if err := m.Catalog.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Filtered = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9831,14 +15414,107 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { 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 + 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: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlcVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UsedColumns", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9866,13 +15542,13 @@ func (m *CodeGenRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SqlcVersion = string(dAtA[iNdEx:postIndex]) + m.UsedColumns = append(m.UsedColumns, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginOptions", wireType) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Insert", wireType) } - var byteLen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9882,82 +15558,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.Insert = bool(v != 0) + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PossibleKeys", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -9967,82 +15578,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.PossibleKeys = append(m.PossibleKeys, 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 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - m.Number = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -10052,65 +15610,27 @@ 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 - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 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 *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 + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength } - if iNdEx >= l { + if postIndex > 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: 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: + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UsedKeyParts", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10138,11 +15658,11 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.UsedKeyParts = append(m.UsedKeyParts, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field KeyLength", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10170,11 +15690,11 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Engine = string(dAtA[iNdEx:postIndex]) + m.KeyLength = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10199,16 +15719,67 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { if postIndex < 0 { return ErrInvalidLength } - if postIndex > l { + 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 } - m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: + 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 Queries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -10218,23 +15789,27 @@ func (m *VetConfig) 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.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) + 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 @@ -10258,7 +15833,7 @@ func (m *VetConfig) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *VetQuery) UnmarshalVT(dAtA []byte) error { +func (m *MySQLExplain_OrderingOperation) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10281,17 +15856,37 @@ func (m *VetQuery) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VetQuery: wiretype end group for non-group") + return fmt.Errorf("proto: MySQLExplain_OrderingOperation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VetQuery: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Sql", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -10301,29 +15896,124 @@ func (m *VetQuery) 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.Sql = string(dAtA[iNdEx:postIndex]) + 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 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -10333,29 +16023,33 @@ func (m *VetQuery) 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.Name = string(dAtA[iNdEx:postIndex]) + if m.Table == nil { + m.Table = &MySQLExplain_Table{} + } + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -10365,27 +16059,80 @@ func (m *VetQuery) 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.Cmd = string(dAtA[iNdEx:postIndex]) + 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 - 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 *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 Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10412,8 +16159,10 @@ func (m *VetQuery) UnmarshalVT(dAtA []byte) error { 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 { + if m.QueryBlock == nil { + m.QueryBlock = &MySQLExplain_QueryBlock{} + } + if err := m.QueryBlock.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index accecef017..55fff26d20 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -225,4 +225,112 @@ message VetQuery 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